Node 03--在Node中使用模板引擎和渲染
发布时间
阅读量:
阅读量
使用readdir获取指定路径下的所有文件名

const fs = require('fs');
fs.readdir('G:/pink_code/Node_Study/02',(err,list) => {
if (!err) {
console.log(list);
}
})
[ '01_http-helloWorld.js', '02_使用readdir获取指定路径下的所有文件名.js', 'www' ]
在浏览器中使用模板引擎
1. 安装art-template
npm install art-template
2. 通过script标签引入art-template
`
全部评论 (0)
还没有任何评论哟~
