ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
~~~ const http = require('http'); const {resolve} = require('path'); const server = http.createServer((req,res)=>{ const url = req.url; console.log(resolve(__dirname,'./template/dir.tpl')) console.log(url) res.statusCode = 200; res.setHeader("Content-Type","text/plain"); res.end('Hello world') }) server.listen(8080 ) ~~~ ~~~ npm i supervisor -g supervisor index.js //就用不断启动node命令 ~~~