Skip to content

Commit

Permalink
[FEAT] Show the server port when the application is launched
Browse files Browse the repository at this point in the history
  • Loading branch information
ak-flash authored Jun 6, 2024
1 parent 4922df3 commit ea4bdfd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,4 +252,7 @@ app.post("/v1/chat/completions", async (req, res) => {
}
});

app.listen(process.env.PORT || 3000);
const server = app.listen(process.env.PORT || 3000, function () {
let port = server.address().port
console.log('Ready! Listening all IP, port: %s. Example: at http://localhost:%s', port, port)
});

0 comments on commit ea4bdfd

Please sign in to comment.