I have just started exploring Angular Universal and Server Side Rendering. I have an existing project, which I kind of got running using Angular Universal's guide.
However, what the documentation doesn't make clear is, how do I apply this to production?
- Do I need 2 separate builds, one for the browser and one that is served by the NodeJS/Express app?
- Do I need something (like NGINX) that stands as a load balancer and forwards the requests to either Build 1 or Build 2?
- Generally, my question is: how do I take an Angular app to production after I've successfully followed Angular Universal's guide?
Currently, after all build commands, I end up with a /dist folder that looks like this:
- /dist/browser/ (contains the index.html file)
- /dist/server/ (contains just main.js)
- /dist/server.js