bubbleletter

Slicehost (Arch Linux) + nodeJS Setup

I've been eyeballin' nodeJS for a while now and finally decided to sign up with slicehost to get a nodeJS server up. Experiments like https://github.com/mape/node-wargames/ or http://live.stagas.com/ (probably more activity here) just get me all excited.

I created an Arch Linux slice on slicehost and installed the development meta package (sudo pacman -S base-devel) and python (sudo pacman -S python). Don't forget to install git as well (sudo pacman -S git-core) so you can get nodeJS.

Next, I cloned the nodeJS git repo (git clone git://github.com/ry/node.git) which results in a node folder. I immediately went in and tried to build node, but failed on the ./configure step. I received the following error:

Scripting.py", line 146 
    except Utils.WafError, e: 
                         ^ 
SyntaxError: invalid syntax

After digging around a bit I finally found out that the syntax for exception catching had changed from python 2 to 3 (see http://www.python.org/dev/peps/pep-3110/). I recalled seeing 3.1 version of python being installed in the beginning.

Because I'm a lazy sucker I didn't go through the source of nodeJS and try and make it 3.1 compatible. Instead, I uninstalled python 3 (sudo pacman -R python) and replaced it with the 2.x version (sudo pacman -S python2).

Trying ./configure again, it complained about not finding the python binary (which was previously located at /usr/bin/python). With the python2 install, python got replaced by python2 (which was really a symlink to python2.7). I simply renamed the python2 symlink to python (sudo mv /usr/bin/python2 /usr/bin/python).

Giddy like a kid in a candy store I tried ./configure again and with a success notification moved on to "make" and "make install" (or sudo make install). Wee, all set up and ready to rock.

What now? Not sure yet... just happy it's up and running at this moment. It's another time suck! Just what I needed. Maybe this will help someone else, though.

An alternative to slicehost is http://nodefu.com/ (nodester). You won't have to worry about this setup procedure as they have it already set up for you (you just need git) or paying money (at least for now). It's currently in alpha/beta(?) and I just got my invite today. It's probably the better option if you want to just try nodeJS out - if you can secure an invite. You just lose a little bit of control in terms to being bound to their setup and domain.

 

 

Old Sketch I Found

Bullandboar

Forgot all about this project. A logo for a restaurant in Texas - "The Bull & Boar"