1.0.0 • Published 3 years ago

xyd-login v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

#解艳东的小demo 、、、js const fs = require("fs"); const http = require("http"); const path = require("path"); const url = require("url")

http.createServer((req,res)=>{ let pathname = url.parse(req.url).pathname if (pathname="/") { pathname = "login.html" } if(path.extname(pathname)){ res.end(fs.readFileSync(path.join,("public",pathname))) }

}).listen("8080",()=>console.log("启动")) 、、、