This website is mainly for developing and learning various technical aspects.
Run the following command to install node packages.
npm i
Add the following to /etc/hosts for sub-domains:
127.0.0.1 example.com
127.0.0.1 rajpatel.example.com
127.0.0.1 jakemaschoff.example.com
127.0.0.1 othersubdomain.example.com
Forwarding port 80 to 8080 and port 443 to 10443.
(Add these commands to /etc/rc.local, also change eth0 to your network interface)
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 10443
pm2 start config/ecosystem.config.js
Once the app is running, visit localhost:8000.
Note: If you run into issues regarding "pm2" not being installed, run this command before running the above command.
sudo npm i -g pm2
pm2 stop config/ecosystem.config.js
pm2 start config/ecosystem.config.js --env production
You'll need to add an SSH key to the server before you can run any of the following commands.
pm2 deploy config/ecosystem.config.js production setup
pm2 deploy config/ecosystem.config.js production
pm2 deploy config/ecosystem.config.js production update