title: How to spawn worker with PM2
body: <p>By using PM2 I've lost the ability to run native clustering that I used to spawn workers, such as in:</p>
  
  <pre><code>if (cluster.isMaster) {
    cluster.schedulingPolicy = cluster.SCHED_NONE;
    for (var i = 1; i &lt; CPUs; i++) {
      cluster.fork();
    }
    Object.keys(cluster.workers).forEach(function(id) {
      cluster.workers[id].on('message', logpi);
    });
    cluster.on('death', function(worker, code, signal) {
      console.error('Death:', worker.pid);
      cluster.fork();
    });
    cluster.on('exit', function(worker, code, signal) {
      console.error('Exit:', worker.pid);
      cluster.fork();
    });
    require('./worker.js');
  } else {
    require('./server.js');
  }
  </code></pre>
  
  <p>How would I go about to spawn workers while launching PM2 in cluster mode <code>$ pm2 start app.js -i 0</code> ?</p>