just a quick question.
What would be more beneficial, serving my angular application via node with a reverse proxy from nginx or just serving it directly from nginx?
I would think it would be faster to serve it direcly from nginx.
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.
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 you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With