node.jsをMacOS Xにインストールしてみた
7月、何も出来ていなくて、何かしたくなって、とりあえず、node.jsをインストールをソースから入れてみた。
インストール手順
$ wget http://nodejs.org/dist/node-latest.tar.gz $ tar zxvf node-latest.tar.gz $ cd node-v0.4.8/ $ ./configure $make $make install
$ node -v v0.4.8
hellow.js
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/');