【发布时间】:2013-07-28 11:41:11
【问题描述】:
我尝试从种子中进行这个简单的更改并创建了相应的 .html 文件(例如 index.html)。
//app.set('view engine', 'jade');
app.set('view engine', 'html');
这个文件保持不变:
exports.index = function(req, res){
res.render('index');
};
但在跑步时我得到了
500 错误:找不到模块“html”
我唯一的选择是使用“ejs”吗?我的意图是结合 AngularJS 使用纯 HTML。
【问题讨论】:
-
请参阅此主题以获得答案:stackoverflow.com/questions/4529586/…希望这会有所帮助,
-
app.engine('html', require('ejs').renderFile);