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}`));