1.npm init -y (pckage.json)
2.npm i -S express
3.var express = reauire('express')
4.var app =express
5.app.get('/',function(req,res){
res.render('index.html',{
comments:comments
})
})
6.app.listen(3000,function(){
console.log("app is running at port 3000.")
})
7. res.render("index.html")前提是 npm install --save art-template express-art-template
node创建项目步骤
最新推荐文章于 2024-10-11 19:00:32 发布