# node-demo **Repository Path**: luotybest/node-demo ## Basic Information - **Project Name**: node-demo - **Description**: learning node.js - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-12-10 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 1、在express中配置使用art-template 模板引擎 >首先需要在express中使用,需要下载express模块 npm install express 然后倒入express库 var express = require('express') 新建一个app实例 app = express(); 2、安装art-template、 express-art-template模块 npm install --save art-template npm install --save express-art-template 配置引擎: app.engine('html',require('express-art-template')); 设置模板文件路径: app.set('views',路径); 使用 app.get('*',(req,res)=>{ res.render(文件名,替换对象) })