#!/bin/bash

echo "Start installing app1"
sudo apt-get update > /dev/null
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs > /dev/null
sudo npm install forever -g > /dev/null
mkdir myapp
cd myapp

wget https://dl.dropboxusercontent.com/u/32823955/scripts/ex2/app2/app.js
wget https://dl.dropboxusercontent.com/u/32823955/scripts/ex2/app2/package.json

sudo npm install > /dev/null
echo "Start node app.js"
forever start app.js