Node.js on Windows 8 with Chocolatey

Disclaimer: I know I’m not the first one who is jumping on this train. I’m late majority when it comes to Node.js and JavaScript. But it’s nonetheless fun to blog about the journey. And that’s the reason for these posts.

Let’s install Chocolatey first. Just open a command prompt and copy and paste the text and press enter.

Choco

For Node JS this is the package you need, because it contains NPM as well.
Just type

[ps]
cinst nodejs.install
[/ps]

And there it goes.
node install

 

Check it out by creating a javascript file with e.g.

[javascript]
console.log("Join us today");
[/javascript]

Save it as joinus.js
And then fire up a Powershell prompt of Dos prompt and type

[ps]
node joinus.js
[/ps]

The result:

[plain]
PS C:\Users\jacqueline\Desktop\Invites> node .\test.js
Join us today
[/plain]

Doesn’t this bring tears in your eyes?

Node.js on the Raspberry Pi

I’m most certainly not the first who tried this, but here is how I did install node.js on my Raspberry Pi.

I installed a fresh image (2013-02-09-wheezy-raspbian.zip), which you can get here.

[bash]
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
[/bash]

Then I went over here and executed the commands in this Gist:

[bash]
echo ‘export PATH=$HOME/local/bin:$PATH’ >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz –strip-components=1
./configure –prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds…
curl https://npmjs.org/install.sh | sh
[/bash]

And after that there is node.js and npm on the Raspberry Pi:

[bash]
pi@raspberrypi ~/node-latest-install $ npm -v && node -v
1.2.14
v0.10.0
[/bash]

Now install Nginx on your Raspberry Pi and start hosting Node apps. Well, first I need a use case. And then I need to know how to write it.