$ ssh [email protected] -i MyAzure.key
$ nano init.sh
Copy these lines
# !/bin/sh
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install build-essential
# nodejs
sudo add-apt-repository -y ppa:chris-lea/node.js
# git
sudo add-apt-repository -y ppa:git-core/ppa
# update apt
sudo apt-get update
# install
sudo apt-get -y install nodejs git
Execute
$ chmod +x init.sh
$ ./init.sh
// install forever (https://github.com/nodejitsu/forever)
$ sudo npm install -g forever
// clone the app
$ git clone https://github.com/arifsetiawan/tasklist.git
$ cd tasklist
// install modules
$ sudo npm install
// edit start script. replace storage name and key with the one you have
$ nano runlinux_prod.sh
// run the app
$ ./runlinux_prod.sh
// check if the app is running
$ forever list
$ curl http://azurecamp.cloudapp.net:3000/api/hello
http://azurecamp.cloudapp.net:3000/api
Install nodemon (https://github.com/remy/nodemon)
$ npm install -g nodemon
edit start script. replace storage name and key with the one you have
$ nano runlinux_dev.sh
On windows, edit runwin_dev.cmd