From e97f35f4746b761e83e703cccf08abddd5c62a8e Mon Sep 17 00:00:00 2001 From: Frallatta Date: Thu, 5 Nov 2020 14:15:36 +0700 Subject: [PATCH] simplify send FCM --- ecosystem.config.js | 1 + index.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ecosystem.config.js b/ecosystem.config.js index e462b8e..6b814f5 100644 --- a/ecosystem.config.js +++ b/ecosystem.config.js @@ -5,6 +5,7 @@ module.exports = { exec_mode: 'cluster', instances: "1", watch: true, + time:true, env: { "PORT": 3004, "NODE_ENV": "development", diff --git a/index.js b/index.js index 1d83612..5ba3af8 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 = 3004; +const port = process.env.PORT || 3004; var dirPath = path.join(__dirname, "fcm_key");