const express=require("express");//引入ejs模板const ejs=require("ejs");
let app=express();
let port=8000;
let host='localhost'//设html后缀
app.set('views','./view');//设置html模板渲染引擎
app.engine('html',ejs.__express);//设置渲染引擎为html
app.set('view engine','html');//路由
let Index=require('./routers/index')
app.use('/',Index);
app.listen(port,host,()=>{
console.log(`http://${host}:${port}`)});