Skip to content

Instantly share code, notes, and snippets.

@stevenchanin
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevenchanin/00cc81a8d308b13c52ca to your computer and use it in GitHub Desktop.
Save stevenchanin/00cc81a8d308b13c52ca to your computer and use it in GitHub Desktop.
NVM / NodeJS / NPM / SANE setup on Ubuntu

Initial

Download and setup 14.04 LTS 64 bit

NOTE: Mongo doesn't seem to work with 32 bit

Update all software using the Software Updater (click on the top left icon and type update, then click on the program). This will require a restart.

Update all your package definitions

sudo apt-get update

Install Git

sudo apt-get install git

Install other parts of the build toolchain

sudo apt-get install build-essential libssl-dev

Install NVM

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash

close & open your terminal

Install the most current version of Nodejs

nvm install v0.12.4

That should leave node set to use "stable" which is pointed at 0.12.4

Make stable the default

nvm alias default stable

Install Sane

npm install -g sails
npm install -g sane-cli
npm install -g ember-cli

Create a test project

mkdir Projects
cd ~/Projects
sane new project
cd project
sane generate resource user name:string age:number
cd server
npm i balderdashy/sails-hook-dev --save
cd ..

Test the sample project

sane up

in your browser, go to localhost:1337 and localhost:4200

Install Mongo DB

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org

Start/Stop Mongo DB

NOTE: this is started automatically by the install, so you won't need to do it. Not sure about what happens after reboot...

sudo service mongod start
sudo service mongod stop

Install Graphicsmagick

Hopefully we don't need to be a the bleeding edge on these packages and can just use apt-get

sudo apt-get install graphicsmagick
sudo apt-get install imagemagick

Install bower

npm install -g bower

Install How To Sane

Get software

NOTE: this may require you to setup SSH keys in ~/.ssh that github knows about

cd ~/Projects
git clone git@github.com:mgenev/how-to-sane.git
cd how-to-sane

Install Client

cd client
bower install
npm install

Install Server

cd ../server
npm install

Start How To Sane

cd ~/Projects/how-to-sane
sane up

You will see lots and lots of lines about errors from JSHint. Just ignore those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment