当前位置:网站首页>The express project changes the jade template to art template
The express project changes the jade template to art template
2022-04-23 02:45:00 【Zero】
-
install
npm install --save art-template
npm install --save express-art-template
(express-art-template Depend on art-template) -
Specified in .html The parsing engine used at the end
app.engine(‘ Resolve the suffix of the file ’, require(‘express-art-template’)) -
To configure , As follows
// The first parameter is HTML Call the template engine... For the end
app.engine('html', require('express-art-template'));
app.set('views', {
debug: process.env.NODE_ENV !== 'production'
});
// Set the template path of the template engine
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'html');
Be careful :
app.engine() The first parameter of should be related to app.set(‘view engine’, ‘html’) The second parameter in should be consistent .
版权声明
本文为[Zero]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220744163052.html
边栏推荐
- Servlet template engine usage example
- Flink stream processing engine system learning (II)
- PIP install shutil reports an error
- Cuisine leetcode
- [hcip] detailed explanation of six LSAS commonly used by OSPF
- Linux Redis——Redis 数据库缓存服务
- Efficient music format conversion tool Music Converter Pro
- 进阶上将程序员必备素质
- 想用Mac学习sql,主要给自己个充足理由买Mac听听意见
- [XJTU computer network security and management] Lecture 2 password technology
猜你喜欢
![[unity3d] rolling barrage effect in live broadcasting room](/img/61/46a7d6c4bf887fca8f088e7673cf2f.png)
[unity3d] rolling barrage effect in live broadcasting room

ROP Emporium x86_ 64 7 ~ 8 questions

基于多态的职工管理系统源码与一些理解

How to solve the complexity of project document management?

Flink stream processing engine system learning (II)

ROP Emporium x86_64 7~8题

How big the program development of single chip microcomputer project can be, it represents your level of knocking code

工业互联网+危化安全生产综合管理平台怎样建

Innovation and management based on Scrum

JVM类加载器
随机推荐
leangoo脑图-共享式多人协作思维导图工具分享
Log4j知识点记录
Flink learning (XI) watermark
Log cutting - build a remote log collection server
Fashion MNIST dataset classification training
Jupyter for local and remote access to ECS
How big the program development of single chip microcomputer project can be, it represents your level of knocking code
hack the box optimum靶机
Preliminary understanding of stack and queue
Parental delegation model [understanding]
php+mysql對下拉框搜索的內容修改
Implementation of distributed scenario business operation log (based on redis lightweight)
Flink stream processing engine system learning (I)
If you want to learn SQL with a Mac, you should give yourself a good reason to buy a Mac and listen to your opinions
Rhcsa day 3 operation
JZ22 链表中倒数最后k个结点
全局、独享、局部路由守卫
[XJTU计算机网络安全与管理]第二讲 密码技术
16、 Anomaly detection
牛客手速月赛 48 C(差分都玩不明白了属于是)