From e4d7d88c6b140ca1cf918ae99a99668155d2b2c9 Mon Sep 17 00:00:00 2001 From: Frallatta Date: Thu, 5 Nov 2020 14:35:55 +0700 Subject: [PATCH] Fix Port Configuration --- ecosystem.config.js | 35 ++++++++++++++++++----------------- index.js | 2 +- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/ecosystem.config.js b/ecosystem.config.js index 6b814f5..393eabb 100644 --- a/ecosystem.config.js +++ b/ecosystem.config.js @@ -1,19 +1,20 @@ module.exports = { - apps : [{ - name: 'FCM-SDK-Admin', - script: 'index.js', - exec_mode: 'cluster', - instances: "1", - watch: true, - time:true, - env: { - "PORT": 3004, - "NODE_ENV": "development", - }, - env_production : { - "PORT": 3004, - "NODE_ENV": "production" - } - }] + apps: [ + { + name: "FCM-SDK-Admin", + script: "index.js", + exec_mode: "cluster", + instances: "1", + watch: true, + time: true, + env: { + PORT: 14003, + NODE_ENV: "development", + }, + env_production: { + PORT: 14003, + NODE_ENV: "production", + }, + }, + ], }; - diff --git a/index.js b/index.js index 5ba3af8..b111c8c 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ const express = require("express"); const path = require("path"); var admin = require("firebase-admin"); -const port = process.env.PORT || 3004; +const port = process.env.PORT || 14003; var dirPath = path.join(__dirname, "fcm_key");