localhost:8888并没有输出页面的代码
来源:3-3 CORS跨域限制以及预请求验证
慕UI4716311
2018-09-16
const http= require(‘http’)
const fs=require(‘fs’)
http.createServer(function(request, response){
console.log('request come', request.url)
const html=fs.readFileSync('hello.html','utf8')
response.writeHead(200,{
'Conten-Type':'text/plain'
})
response.end(html)
}).listen(8888)
console.log(‘server listening on 8888’)
写回答
1回答
-
Jokcy
2018-09-17
那输出了啥?
012018-09-25
相似问题