From b83b539cab88831933b3ab5ab6ee354135c5ab8f Mon Sep 17 00:00:00 2001 From: Jeremy Camacho Lugo Date: Fri, 18 Jun 2021 09:36:05 +0100 Subject: [PATCH] process.env.PORT added --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 3264d6d..b53f16d 100644 --- a/index.js +++ b/index.js @@ -30,7 +30,7 @@ mongoose.connect( .use(express.json()) .use(express.static(path.join(__dirname, 'public'))) .use('/api', router) - .listen(8080, (err) => { + .listen(process.env.PORT || 8080, (err) => { console.info('\n\n' + '>'.repeat(40)) console.info('💻 Reboot Server Live') console.info('📡 PORT: http://localhost:8080')