日期:2014-05-16 浏览次数:20388 次
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git
sudo git clone git://github.com/ry/node.git
./configure make sudo make install
var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World Node.js'); }).listen(8030, "127.0.0.1"); console.log('Server running at http://127.0.0.1:8030/');
node example.js