You should have Nodejs and NPM installed on your system.
To install forever run the following command:
npm install forever -g
sudo apt-get update
sudo apt-get install git
Now, clone the project:
git clone https://github.com/Cloudkibo/WebHook/
Run following two commands
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8443
Now on terminal, set the environment variables in /etc/environment.
nano /etc/environment
We need to set the following variables: (Just copy paste and then change the values)
NODE_ENV=production
FACEBOOK_ID=<YOUR FB ID>
FACEBOOK_SECRET=<YOUR FB SECRET>
DOMAIN=<YOUR DOMAIN>
Now, run the following command to install dependencies:
npm install