Currently I am running NodeJs server as background process in the host machine to achieve sender side rendering for my angular app.
On Linux for e.g. npm rum server & (ampersand is to put process in background)
But I am looking for solution like Apache Server that manages it start/stop with host reboot.
4
Answers
I think the best way for you to acheive what you’re looking for is to use a management solution like PM2 or Forvever. These will pretty easily manage your solution in the background for you.
Yes. You should be able to.
Start by creating a proper deployment directory – https://angular.io/guide/deployment
Then copy/ftp/whatever to the web server.
The tricky part is in your route controllers, etc. and getting all of the paths right if you end up deploying into a different directory than what you developed for.
Rather than apache/nginx managing start stop of your node application, you may create service to run your node application. It will run without any manual intervention.
This would make your life for handling these services pretty easy.
You need to use Apache/Ngnix with NodeJS using proxy.
Look into this link, if this helps:
https://blog.daudr.me/painless-angular-ssr/