Skip to content

Commit

Permalink
listen to the env port
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuangwang committed Feb 21, 2024
1 parent 95e5aa5 commit 4fb1912
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44638,4 +44638,7 @@ app.use(express.static(path$2.join(__dirname, "..", "browser")));
app.get("*", function (request, response) {
response.sendFile(path$2.join(__dirname, "..", "browser", "index.html"));
});
app.listen(4000);
var port = process.env.PORT || 3000;
app.listen(port, () => {
console.log(`Node Express server listening on http://localhost:${port}`);
});
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ app.use(express.static(path.join(__dirname, "..", "browser")));
app.get("*", function (request, response) {
response.sendFile(path.join(__dirname, "..", "browser", "index.html"));
});

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
a file system access
, but is not rate-limited.
app.listen(4000);
var port = process.env.PORT || 3000;
app.listen(port, () => {
console.log(`Node Express server listening on http://localhost:${port}`);
});

0 comments on commit 4fb1912

Please sign in to comment.