From 3f11985c5a4305e061db19499d4ee49c30393d26 Mon Sep 17 00:00:00 2001 From: Gabriel Dalseco <55258427+GabrielCoruja@users.noreply.github.com> Date: Tue, 18 Jan 2022 19:42:53 -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}`));