I am running a angular cli development on a remote server, would it possible to run this development application in daemon mode? like what we use in forever.js
thanks in advance!!
The CLI serve feature is only for development. It does not support production server scenario. If you run ng serve -prod
you'll get a warning about that.
The typical story is that you run ng build -prod
, and then take the dist
(or whatever your output folder is) and serve it under any server program you like (Apache, nginx, IIS, etc.). At the end of the day, this is a folder of just static files, so, it doesn't have any special server requirements.
Closing as answered by @Meligy, thank you!
you can use the following command to run ng with forever
forever start node_modules/@angular/cli/bin/ng serve
its running in local host only. What I do to make it on ip address.
forever start node_modules/@angular/cli/bin/ng serve --host {ip_address or domain} --prod
And what is the command if I want to stop the infinite running server?
You can use
forever stop
for a particular server or
forever stopall
to stop all servers starting using forever.
How do i make angular run indefinitely on the server? With forever.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
you can use the following command to run ng with forever
forever start node_modules/@angular/cli/bin/ng serve