nodejs 简单的静态web服务器

为了建立服务器要引入http模块javascriptconst http=require("http"); 建立服务器与监听端口 http.createServer((req,res)=>{ }).listen(8001); 为网页添加信息 res.writeHead(200,{"content-type":"text/html;charset='utf-8'"}); res.write("这是静
相关文章
相关标签/搜索