This repository is hosting the code for the CDN of CloudKibo. This CDN is used to serve static files to all of the CloudKibo products such as KiboChat, KiboEngage and KiboCommerce.
https://adrianmejia.com/blog/2016/08/24/building-a-node-js-static-file-server-files-over-http-using-es6/
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/KiboCDN/
Run following two commands
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 9000
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
Now, run the following command to install dependencies:
npm install