How to keep ng serve, angular running on production server on ubuntu using nginx as website server

How to keep ng serve, angular running on production server on ubuntu using nginx as website server

Solution 1

$ sh -c ng serve -w –port 1355 –live-reload 1356 –aot –env=prod “/home/ubuntu/project/ukgoodbye/”

Solution 2

$ forever start node_modules/@angular/cli/bin/ng serve -w –port 1355 –live-reload 1356 –aot –env=prod “/home/ubuntu/project/ukgoodbye/”


sudo forever start node_modules/@angular/cli/bin/ng serve -w --port 1355 --live-reload 1356 --aot --env=prod 
warn:    --minUptime not set. Defaulting to: 1000ms
warn:    --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info:    Forever processing file: node_modules/@angular/cli/bin/ng

Check the log:
$ nano -v /home/ubuntu/.forever/dfyn.log

sudo forever start –watch app.js that will run sails lift