From 3a6d0f38d77d5ade18798a3f5efaf6ecc21b2677 Mon Sep 17 00:00:00 2001 From: Isaac Grynsztein Date: Sat, 21 Mar 2020 21:28:29 -0400 Subject: [PATCH] updated procfile and made server heroku compatible --- Procfile | 2 +- backend/app.js | 6 ++++++ package.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Procfile b/Procfile index bd235c0..2082008 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: cd backend && node app.js \ No newline at end of file +web: cd backend && npm install && node app.js \ No newline at end of file diff --git a/backend/app.js b/backend/app.js index 9160980..e0dcb29 100644 --- a/backend/app.js +++ b/backend/app.js @@ -108,6 +108,12 @@ function File(id, title, thumbnailURL, isAudio, duration, url, uploader, size, p // actual functions function startServer() { + if (process.env.USING_HEROKU) { + // default to port 80 on heroku + backendPort = 80; + + // TODO: set config to port 80? + } if (usingEncryption) { https.createServer(options, app).listen(backendPort, function() { diff --git a/package.json b/package.json index 64c1aec..b5a01df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "youtube-dl-material", - "version": "0.0.0", + "version": "3.5.0", "license": "MIT", "scripts": { "ng": "ng",