2011-10-11 100 views

回答

3

有一吨的教程在那里 - 只是谷歌自己的方式给他们。

nodejs.org网站采取了一个简单的HTTP服务器的例子:

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

还有a great video where Ryan is explaining what Node.js is all about

而且有趣的是Express.js框架。

但是打好基础第一。