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("這是靜
相關文章
相關標籤/搜索