Skip to content

Commit

Permalink
Adicionando process.env.PORT
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielCoruja authored and phramos07 committed Mar 17, 2022
1 parent 203f2ce commit 3f11985
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ const app = express();

app.get('/users', rescue(UserController));

app.use(errorMiddleware);
app.use(errorMiddleware);

module.exports = app;
2 changes: 1 addition & 1 deletion src/api/server.js
Original file line number Diff line number Diff line change
@@ -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}`));

0 comments on commit 3f11985

Please sign in to comment.