update port checking on prod

This commit is contained in:
2021-07-21 12:20:06 +01:00
parent 3268cca452
commit ea56f9e228
8 changed files with 380 additions and 15 deletions
+2 -1
View File
@@ -5,7 +5,8 @@ import https from "https";
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0;
let BASE_URL;
BASE_URL = process.env.API_ROOT || "http://localhost";
const port = parseInt(process.env.PORT, 10) || 3000;
BASE_URL = process.env.API_ROOT || `http://localhost:${port}`;
const agent = new https.Agent({
rejectUnauthorized: false,