fix APP_URL variable

This commit is contained in:
Bilal Catic
2019-09-11 11:27:45 +02:00
parent 202c4e441e
commit 510c7917dd

View File

@@ -1,7 +1,10 @@
const APP_PORT = process.env.PORT || 5000;
const APP_BASE_URL = process.env.APP_BASE_URL || "http://localhost";
const APP_URL = `${APP_BASE_URL}:${APP_PORT}`;
const APP_URL =
process.env.NODE_ENV && process.env.NODE_ENV === "production"
? process.env.APP_URL || "http://market-alarm"
: process.env.APP_URL || `${APP_BASE_URL}:${APP_PORT}`;
module.exports = {
APP_PORT,