diff --git a/packages/nylas-api/app.js b/packages/nylas-api/app.js index 68ebaa377..bca30c9af 100644 --- a/packages/nylas-api/app.js +++ b/packages/nylas-api/app.js @@ -18,7 +18,7 @@ const server = new Hapi.Server({ }, }); -server.connection({ port: process.env.PORT || 5100 }); +server.connection({ port: process.env.PORT }); const plugins = [Inert, Vision, HapiBasicAuth, HapiBoom, { register: HapiSwagger, diff --git a/packages/nylas-dashboard/app.js b/packages/nylas-dashboard/app.js index d0912330c..f29e78121 100644 --- a/packages/nylas-dashboard/app.js +++ b/packages/nylas-dashboard/app.js @@ -8,8 +8,7 @@ const path = require('path'); global.Promise = require('bluebird'); const server = new Hapi.Server(); -server.connection({ port: process.env.PORT / 1 + 1 || 5101 }); - +server.connection({ port: process.env.PORT }); const attach = (directory) => { const routesDir = path.join(__dirname, directory) diff --git a/pm2-dev.yml b/pm2-dev.yml index 9c3d520ce..6a0e8768f 100644 --- a/pm2-dev.yml +++ b/pm2-dev.yml @@ -2,6 +2,7 @@ apps: - script : packages/nylas-api/app.js name : api env : + PORT: 5100 DB_ENCRYPTION_ALGORITHM : "aes-256-ctr" DB_ENCRYPTION_PASSWORD : "d6F3Efeq" GMAIL_CLIENT_ID : "271342407743-nibas08fua1itr1utq9qjladbkv3esdm.apps.googleusercontent.com" @@ -15,6 +16,7 @@ apps: - script : packages/nylas-dashboard/app.js name : dashboard env : + PORT: 5101 DB_ENCRYPTION_ALGORITHM : "aes-256-ctr" DB_ENCRYPTION_PASSWORD : "d6F3Efeq" - script : packages/nylas-message-processor/app.js