EC2のLinuxサーバにnode.jsをインストールしてみた。
$ sudo yum localinstall --nogpgcheck http://nodejs.tchol.org/repocfg/amzn1/nodejs-stable-release.noarch.rpm
$ sudo yum install nodejs-compat-symlinks npm
$ nodejs -v
v0.6.15
$ which nodejs
/usr/bin/nodejs
$ sudo yum install nodejs-compat-symlinks npm
$ nodejs -v
v0.6.15
$ which nodejs
/usr/bin/nodejs
引数なしでnodejsを実行するとインタラクティブモードになる。
$ nodejs
> console.log("Hello" + " " + "World");
Hello World
undefined
> console.log("Hello" + " " + "World");
Hello World
undefined
引数にファイル名を指定して実行すると、そのファイルの内容が実行される。
$ cat hello.js
console.log("Hello World!!!");
$ nodejs hello.js
Hello World!!!
console.log("Hello World!!!");
$ nodejs hello.js
Hello World!!!
Day by day I am learning a lot more about NodeJS. It’s definately the only real language to get familiar with long-term. I have fulfilled the BackSpace.Academy Amazon cloud Certified Developers educational program. It has expanded a brand new Arena of apps for myself. Now I must spare the time to get developing!