module.exports = {
  /**
   * Application configuration section
   * http://pm2.keymetrics.io/docs/usage/application-declaration/
   */
  apps : [

    // First application
    {
      name      : "autograph-server",
      script    : "app.js",
      env: {
        NODE_ENV: "development"
      },
      env_production : {
        NODE_ENV: "production",
        PORT: 4000
      }
    },

    // Second application
    {
      name      : "autograph-crawler",
      script    : "cron-job.js"
    }
  ],

  /**
   * Deployment section
   * http://pm2.keymetrics.io/docs/usage/deployment/
   */
  deploy : {
    production : {
      user : "node",
      host : "212.83.163.1",
      ref  : "origin/master",
      repo : "git@github.com:repo.git",
      path : "/var/www/production",
      "post-deploy" : "npm install && pm2 startOrRestart ecosystem.json --env production"
    },
    dev : {
      user : "node",
      host : "212.83.163.1",
      ref  : "origin/master",
      repo : "git@github.com:repo.git",
      path : "/var/www/development",
      "post-deploy" : "npm install && pm2 startOrRestart ecosystem.json --env dev",
      env  : {
        NODE_ENV: "dev"
      }
    }
  }
}

@@ -282,16 +282,36 @@
 lopment%22
+,%0A        PORT: 3001
 %0A      %7D
@@ -371,28 +371,58 @@
 ion%22
-,%0A        PORT: 4000
+%0A      %7D,%0A      env_dev: %7B%0A        NODE_ENV: %22dev%22
 %0A   
@@ -771,36 +771,51 @@
 %22git@github.com:
-repo
+FTChinese/autograph
 .git%22,%0A      pat
@@ -981,36 +981,47 @@
     host : %22
-212.83.163.1
+node.corp.ftchinese.com
 %22,%0A      ref
@@ -1070,20 +1070,35 @@
 hub.com:
-repo
+FTChinese/autograph
 .git%22,%0A 
@@ -1115,27 +1115,26 @@
 : %22/
-var/www/development
+data/git/ftacademy
 %22,%0A 

test remote