I would like to know what is best practice for running Angular 2 in production. I am asked to build a software factory (continuous integration, automated build, automated deployment).
What confuses me is this:
We don't use a development server. We're expected to deploy the application and its dependencies to a real production server. https://angular.io/docs/ts/latest/guide/webpack.html#!#production-configuration
Why do I have to run the application on the same server?
Currently I have set-up a jenkins server. The idea is that when changes occur (it polls git every 15 min) it tests the software and on succeeding starts a build and automatically deploys this to another server. But with the Angular CLI the build command doesn't generate a deployable dist folder. You still have to run it through ng serve.
The issue I have with just building it on the production server is that upon failing the test it should not proceed.
Has anyone implemented something simular or have an idea how to set this up?