Playing with Debian and Node.js

I have been playing around with Debian and Node.js during the last week and I think the experience is quite interesting. Getting started and choosing the right packages and build chains is not as simple as it seems in the beginning.

Some of my current choice of tools has fallen on nvm, gulp, compass, babelify and browserify. I also use virtual machines running in Virtual Box in order to secure a stable development environment. Using VMs makes the environment portable and resistant to platform differences.

Working with VMs

Working with VMs is all it’s cracked up to be. Virtual Box 5 is a very nice platform to run on and performs very well even without hardware virtualization enabled.

The networking and virtual disk management are the primary parts and tools which enables a great work environment.

Working with Debian

Debian is my choice of platform due to me being comfortable with the OS already. Using Debian over Ubuntu was a simple choice since stability and reliability is an important factor.

In order enable me as a developer to I choose to have my development toolbox in the native environment of the computer I am working on. This means that I need a way to communicate with the file system of the VM. This is done using the smb protocol sharing a projects folder and connecting it as a network drive. This allows node to run very fast while I can work natively and quickly. There are some occasional slowdowns when using solutions with a lot of file I/O such as git though, but it’s all within workable limits.

Setting up Debian is pretty straight forward but in order to prepare for Node.js and future web development using SASS I need some extra installed packages.

# Basic installs
apt-get install build-essential ruby ruby-dev curl
# Install compass
gem install compass

Working with Node.js

In order to make the most of the node installation we install it using nvm (Node Version Manager). This enables switching between node versions on the fly for any current project.

# Installing nvm (Node Version Manager)
curl https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
# Installing a specific version of node
nvm install v0.10.32

Overall

In closing, working with Debian and Node.js is a very nice experience when you’ve gotten into using the right tools. If you are on a *nix like system you’ll get the most out of it but windows is really catching up.

I’ve been using Debian, Node.js, Compass and React to build web apps on my spare time and for work and they are all truly a joy to work with. ES6-4-life or until I finally return to coding in C.

Leave a Reply