Last Updated: February 25, 2016
· denzuko

Install Full Express.js stack in 8 Lines of shell code


I do this a lot for clients on newly built vm images. Personally I rather use a puppet manifest for this but that comes later.

$ apt-get update
$ apt-get install build-essential openssl libssl-dev git curl mongodb

$ sudo git clone git:// /usr/local/nvm
$ cat ->> ~/.bashrc << EOL
  [ -x /usr/local/nvm/ ] && source /usr/local/nvm
  [ -r $NVM_DIR/bash_completion ] && .     $NVM_DIR/bash_completion

$ nvm install v0.6.15
$ nvm default v0.6
$ nvm use v0.6
$ npm install coffee-script uglify-js express jade mongojs stylus

After that you know what to do, just have fun. Please send your comments to @denzuko on twitter with the hashtag #coderwall