XIM*_*MRX 3 template-engine node.js express
我有这个 node.js项目,它使用jade模板.但我需要使用简单的html页面.安全转型需要准则.
我需要使用完整的.html页面,如index.html,login.html.没有任何模板引擎可以在localhost:3000和localhost:3000/login.html等路由中显示.哪个应该与完整功能一起使用.
你可以改变它config/express.js
:
app.set('view engine', 'jade')
Run Code Online (Sandbox Code Playgroud)
例如,如果你想使用把手,然后取出"jade": "latest",
在packages.json
和添加"handlebars": "latest"
.然后运行npm install
并编辑config/express.js
:
app.set('view engine', 'handlebars')
Run Code Online (Sandbox Code Playgroud)