Angular 2 continuous deployment with jenkins and seperate production server
<p>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). </p>

<p>What confuses me is this: </p>

<blockquote>
  <p>We don't use a development server. We're expected to deploy the application and its dependencies to a real production server.
  <a href="https://angular.io/docs/ts/latest/guide/webpack.html#!#production-configuration" rel="nofollow noreferrer">https://angular.io/docs/ts/latest/guide/webpack.html#!#production-configuration</a> </p>
</blockquote>

<p>Why do I have to run the application on the same server?</p>

<p>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. </p>

<p>The issue I have with just building it on the production server is that upon failing the test it should not proceed.</p>

<p>Has anyone implemented something simular or have an idea how to set this up? </p>