app.engine('.html', require('ejs').__express);
app.set('view engine', 'html');//加上html,render時(shí)歉嗓,不用寫(xiě).html
如:
router.get('/', function(req, res, next) {
res.render('wangyi', { title: 'WANGYI' });
});
app.engine('.html', require('ejs').__express);
app.set('view engine', 'html');//加上html,render時(shí)歉嗓,不用寫(xiě).html
如:
router.get('/', function(req, res, next) {
res.render('wangyi', { title: 'WANGYI' });
});