'Node.js'에 해당되는 글 1건

  1. 2011.11.22 node.js
2011. 11. 22. 00:59
node.js
$ cd ~
$ apt-get update
$ apt-get install g++ curl libssl-dev apache2-utils
$ apt-get install git-core
$ git clone git://github.com/ry/node.git
$ cd node
$ git fetch --all
$ ./configure
$ make
$ make install


$ vim hello_node.js
 

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

$ node hello_node.js


Posted by Нуеоп
이전버튼 1 이전버튼