From 3892a76ec8effdd77aeb2b3aa7a895e16cf6a1fb Mon Sep 17 00:00:00 2001 From: Nick Chaloult Date: Sat, 7 May 2022 13:39:09 -0400 Subject: [PATCH] Remove duplicate PORT variable; export the one in app.js --- backend/app.js | 2 +- backend/server.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/app.js b/backend/app.js index 21d13fe..eae0955 100644 --- a/backend/app.js +++ b/backend/app.js @@ -28,4 +28,4 @@ const invoice = require('./api/invoice'); app.use('/api/v1/spot', spot); app.use('/api/v1/invoice', invoice); -module.exports = app; +module.exports = { app, PORT }; diff --git a/backend/server.js b/backend/server.js index d070c96..bee9e15 100644 --- a/backend/server.js +++ b/backend/server.js @@ -1,5 +1,4 @@ -const app = require('./app'); -const PORT = process.env.PORT || 4000; +const { app, PORT } = require('./app'); const debug = require('./utils/debug'); app.listen(PORT, () => {