How Can I run PM2 with Angular-Cli? - Angular2
<p>How can I run:
<code>ng serve --prod</code> with pm2? </p>

<p>ng serve from angular-cli, Angular2. I'm running on DigitalOcean. </p>

<p>I have tried to test with <code>http-server -p 4200 -d false</code> in the dist/ folder after <code>ng build --prod</code> </p>

<p>When I request from the domain <a href="https://www.unibookkh.com/" rel="noreferrer">https://www.unibookkh.com/</a>, i got 404 error: (I've already setup nginx to listen to port 4200.</p>

<p><a href="https://i.stack.imgur.com/rnZiv.png" rel="noreferrer"><img src="https://i.stack.imgur.com/rnZiv.png" alt="enter image description here"></a></p>

<p>I test with http-server because I think I maybe can run pm2 through this command 
<code>pm2 start my_app_process.json</code> where </p>

<p><strong>my_app_process.json</strong> </p>

<pre><code>{
    "apps": [
        {
            "name": "angular",
            "cwd": "~/angular2",
            "args": "-p 4200 -d false",
            "script": "/usr/bin/http-server"
        }
    ]
}
</code></pre>

<p>Any better ideas of how to get it working with PM2? </p>