2012-03-18 43 views
1

我只是抓住了從在線教程,代碼:Node.js的世界,你好腳本不工作

var http = require('http'); 
http.createServer(function (req, res) { 
    res.writeHead(200, {'Content-Type': 'text/plain'}); 
    res.end('Hello World\n'); 
}).listen(3000, 'my.ip.is.here'); 
console.log('Server running at http://my.ip.is.here:3000/'); 

當我開始:

node app.js 

我得到以下錯誤:

events.js:48 throw arguments 1 ; // Unhandled 'error' event ^Error: accept ENOSYS at errnoException (net.js:614:11) at TCP.onconnection (net.js:788:24)

我在一個Ubuntu 11.10服務器VPS,我有Nginx作爲Web服務器,但它沒有啓動。

我做錯了什麼?

+0

當系統不支持某個功能時,會出現ENOSYS。這可能與使用VPS有關 - 您是否在本地計算機上嘗試過? – 2012-03-18 11:22:20

+0

得到它解決,感謝您的輸入 – silkAdmin 2012-03-18 11:50:23

+0

沒有後顧之憂,很高興你得到它的工作。幾天後,你將能夠接受你自己的答案 – 2012-03-18 11:52:02

回答

0

我的版本的node.js是從git rep我試圖nodejs.org之一,它現在工作正常。