level 4
沐羽_澄风
楼主
买了一本Node.js权威指南,看不懂啊
第一个程序就不会。
var http = require(*http*);
http.createServer(function (req,res) {
res.writeHead(200, {*Content-Type*: *text/html*});
res.write(*<head><meta charset="utf-8"/></head>*);
res.end(*你好\n*);
}).listen(1337,"127.0.0.1");
console.log(*Server running at http://127.0.0.1:1337/*);
这代码有问题吗,照着书一个字一个字敲的,为什么总出现错误提示说缺少对象![[泪]](/static/emoticons/u6cea.png)
求大神指教![[泪]](/static/emoticons/u6cea.png)
![[乖]](/static/emoticons/u4e56.png)
2014年08月15日 03点08分
1
var http = require(*http*);
http.createServer(function (req,res) {
res.writeHead(200, {*Content-Type*: *text/html*});
res.write(*<head><meta charset="utf-8"/></head>*);
res.end(*你好\n*);
}).listen(1337,"127.0.0.1");
console.log(*Server running at http://127.0.0.1:1337/*);
这代码有问题吗,照着书一个字一个字敲的,为什么总出现错误提示说缺少对象
求大神指教