});}
http.createServer(function(req,res){ var pathname = url.parse(req.url).pathname; req.setEncoding("utf8"); res.writeHead(200,{'Content-Type':'text/html'}); router(req,res,pathname);}).listen(3000,'127.0.0.1');
运行效果如下:
到此这个小工具便完成了。
2023-03-10
0万阅读
2023-02-23
3万阅读
2023-02-09
7万阅读
2023-01-08
4万阅读
2022-12-26
2万阅读
2022-12-22
1万阅读
2022-12-12
2022-12-10
5万阅读