Skip to content

Commit

Permalink
Update for Heroku deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
KeziaWahome committed Jan 4, 2024
1 parent b4fedc6 commit cf5bbc8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Empty file added api/.env
Empty file.
7 changes: 4 additions & 3 deletions api/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ import swaggerUi from 'swagger-ui-express';
import { swaggerSpec } from './swagger.js';
import path from 'path';

const PORT = process.env.PORT || 4000;

const secret = 'secret123';
const app = express();
Expand Down Expand Up @@ -337,6 +338,6 @@ app.get('*', (req, res) => {

});



app.listen(4000);
app.listen(PORT, () => {
console.log(`Server is running on port ${PORT}`);
});

0 comments on commit cf5bbc8

Please sign in to comment.