You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
392 B

// 引入express
const express = require("express");
const fs = require("fs")
// 创建网站服务器
const app = express();
const index = express.Router()
const home = express.Router()
app.use("/index",index)
app.use("/home",home)
home.get("/",(req,res)=>{
res.send("home")
})
home.get("/hexi",(req,res)=>{
res.send("home/hexi")
})
// 开启服务器监听
app.listen(80);