0
我在一家MongoDB course沿以下,來到一個基本的節點你好世界服務器教程:節點「 n」的錯誤當本地主機服務器
基本上它只是顯示的Hello World在localhost: 8000
所以我輸入了下面的代碼,當我試圖運行它,跑進了以下錯誤:
var http = require('http');
var server = http.createServer(function (request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.end("Hello, World"\n);
});
server.listen(8000);
console.log("Server running at http://localhost:8000");
如果我刪除\ n它會工作正常,只是好奇老師如何讓他的工作與它沒有錯誤?
啊謝謝!跑步前他必須糾正 – 2014-11-02 21:41:51