title: NodeJS server doesn't start with pm2
body: <p>When I'm trying to start my nodeJS-server with pm2 it stops or returns an error. </p>
  
  <p>Here's the relevant package.json file:</p>
  
  <pre><code>"scripts": {
  "start": "nodemon --watch '**/*.ts' --exec ts-node index.ts",
  "bundle-colyseus-client": "browserify ./node_modules/colyseus.js/lib/index.js -s Colyseus -o static/colyseus.js",
  "build": "npm run bundle-colyseus-client",
  "heroku-postbuild": "npm run build"}
  </code></pre>
  
  <p>I tried the following commands to start the server: </p>
  
  <ul>
  <li><code>pm2 start npm -- start</code> <a href="https://i.stack.imgur.com/pACMY.png" rel="nofollow noreferrer">STOP</a></li>
  <li><code>pm2 start index.ts</code>
  <a href="https://i.stack.imgur.com/sBvuS.png" rel="nofollow noreferrer">ERROR</a></li>
  </ul>