我试图把一个html在node.js的一个页面,这是代码:如何避免第一个参数必须是一个字符串或缓冲区节点JS
var http = require('http');
var fs=require('fs');
fs.readFile('C:\Users\Eventi\Desktop\Node.js\Progetti\ProveNodeJS\NodeJSProve\home.html', function (err, html) {
if (err) {
}
http.createServer(function(request, response) {
response.writeHeader(200, {"Content-Type": "text/html"});
response.write(html);
response.end();
}).listen(8000);
});
当我走在URL http://localhost:8000
我获得错误first argument must be a string or Buffer node js
。任何人都可以帮助我?