From 25dc8d137a30f4448f778fe085a2037ddc9a7305 Mon Sep 17 00:00:00 2001 From: Isaac Grynsztein Date: Sat, 21 Mar 2020 21:58:13 -0400 Subject: [PATCH] Fixed heroku port --- backend/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app.js b/backend/app.js index e0dcb294..49805ea1 100644 --- a/backend/app.js +++ b/backend/app.js @@ -108,9 +108,9 @@ function File(id, title, thumbnailURL, isAudio, duration, url, uploader, size, p // actual functions function startServer() { - if (process.env.USING_HEROKU) { + if (process.env.USING_HEROKU && process.env.PORT) { // default to port 80 on heroku - backendPort = 80; + backendPort = process.env.PORT || backendPort; // TODO: set config to port 80? }