Serve angular in node vs nginx

nginx(as a reverse proxy) + nodejs - It's the best choice.

You will have much more benefits if you choose nginx as a frontend for nodejs. (ssl, http2, configuration, load balancing etc.)

If we think about static files (js, html, images) - it's more easier to cache them in one place (nginx host config) node also works with static file quite good.

I think that nodejs engine/server should do only one thing and it's business logic of the application.


If there is a clean separation of your client-side code and your server side code (e.g so anything the client needs to run is either pre-built into static files or served using your rest api), then it's far better to serve the client-side files either directly from NGINX or from a CDN. Performance and scaling are better, and there is less work for you to do in code on the server to manage caching, etc. plus you can later scale the api independently.