This commit is contained in:
2023-10-18 11:17:06 +07:00
parent b24335043a
commit 6c93cff3bb
2 changed files with 23 additions and 15 deletions
+12 -10
View File
@@ -3,17 +3,19 @@
NODE_ENV=development
CUSTOM_MODE_NODE_ENV=devprod
#NODE_ENV=testing
RUNNING_ON_MULTIPLE_PORT=true
PORT=3000
PORT3001=3001
PORT3002=3002
PORT3003=3003
PORT3004=3004
VERSION=v1.4.6
# ===================== CLUSTER NODE (YES or NO) ===========================
CLUSTER_NODE=NO
# ===================== CLUSTER WITH RUNNING ON MULTIPLE PORT (YES or NO) ===========================
RUNNING_ON_MULTIPLE_PORT=NO
# PISAHKAN DENGAN MENGGUNAKAN SEPARATOR KOMA TANPA SPASI
PORTS=3001,3002,3003,3004
# =========================== KONFIGURASI UNTUK SERVER ===========================
# SERVER_FOR=development
#SERVER_FOR=production
@@ -39,9 +41,9 @@ DB_USER_POOLING=postgres
DB_PASSWORD_POOLING=inhc0mmute_cms
# ==================================== LOKI =====================================
LOKI_URL=http://10.20.14.30:3100
LOKI_URL=http://localhost:3100
# ==================================== APP PROMETHEUS =====================================
# =============================== APP PROMETHEUS =================================
PROM_APP = topuponline
# ================================== SECRET KEY ==================================
+11 -5
View File
@@ -60,12 +60,18 @@ function startExpress() {
// set port, listen for requests
const PORT = process.env.PORT || 3000;
let message = `Server is running on version ${
process.env.VERSION
} environment: ${process.env.NODE_ENV.toUpperCase()} port: ${PORT} on ${serverActive}. HSM STATUS : ${serverHSMStatus} `;
if (process.env.CLUSTER_NODE.toUpperCase() == 'YES') {
message = `Server is running with cluster node on version ${
process.env.VERSION
} environment: ${process.env.NODE_ENV.toUpperCase()} port: ${PORT} on ${serverActive}. HSM STATUS : ${serverHSMStatus} `;
}
app.listen(PORT, () => {
winston.logger.info(
`Server is running on version ${
process.env.VERSION
} environment: ${process.env.NODE_ENV.toUpperCase()} port: ${PORT} on ${serverActive}. HSM STATUS : ${serverHSMStatus} `
);
winston.logger.info(message);
});
// jika settingan running on multiple