Skip to content

Commit

Permalink
chore: Update express server to listen on process.env.PORT or 3000
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshitShukla-dev committed Jul 12, 2024
1 parent cae80d1 commit e575676
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ app.use(express.json())
app.use(cookieparser())
app.use("/api/v1",rootRouter)

app.listen(3000,function() {
console.log("Listening on Port: 3000")
})
app.listen(process.env.PORT || 3000, function() {
console.log(`Listening on Port: ${process.env.PORT || 3000}`);
});
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"argon2": "^0.40.1",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"jsonwebtoken": "^9.0.2",
"nodemailer": "^6.9.13",
Expand Down

0 comments on commit e575676

Please sign in to comment.