title: How use pm2 to deploy an angular2 app in remote server
body: <p>I'm using a CI process to deploy my applications. So, I'm planning build a nodeJS and Angular2 Apps in remote server.</p>
  
  <p>For NodeJS App, I'm using pm2 to start a processo. I'm planning to create an ecosystem an start the native deployment process of pm2 (<a href="http://pm2.keymetrics.io/docs/usage/deployment/" rel="nofollow noreferrer">link</a>). </p>
  
  <p>Here is my json file: </p>
  
  <pre><code>  {
        name      : "testpm2",
        script    : "../index.js",
        //...,
      }
    ],
    deploy : {
      //...,
      dev : {
        user : "vagrant",
        host : "192.168.56.11",
        ref  : "origin/master",
        repo : "&lt;repo - git&gt;",
        path : "/var/lib/development",
        "post-deploy" : "npm install &amp;&amp; pm2 startOrRestart /var/lib/development/ecosystem.json --env dev",
        env  : {
          NODE_ENV: "dev"
        }
      }
    }
  </code></pre>
  
  <p>So, everything is fine. Node behaviour is pretty cool!!!</p>
  
  <p>So, my question is: can I use the same process to start an Angular2 Application? I'm using angular2-cli, then, I start the process using <strong>ng build</strong> and <strong>ng serve</strong> calls. It is possible to do that with pm2 deployment, as the same of NodeJS?</p>
  
  <p>Thanks.</p>