From b3efd56e043c7514d75f62eab343ff1c3ca9f230 Mon Sep 17 00:00:00 2001 From: pauloricardoz Date: Mon, 5 Sep 2022 19:44:04 -0300 Subject: [PATCH] Adicionando process.env.PORT --- src/api/app.js | 2 +- src/api/server.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/app.js b/src/api/app.js index d7e7a62..e1fe587 100644 --- a/src/api/app.js +++ b/src/api/app.js @@ -7,6 +7,6 @@ const app = express(); app.get('/users', rescue(UserController)); -app.use(errorMiddleware); +app.use(errorMiddleware); module.exports = app; diff --git a/src/api/server.js b/src/api/server.js index bdcc2b9..b77242c 100644 --- a/src/api/server.js +++ b/src/api/server.js @@ -1,5 +1,5 @@ const app = require('./app'); -const PORT = 3000; +const PORT = process.env.PORT || 3000; app.listen(PORT, () => console.log(`Rodando na porta ${PORT}`));