I m trying to deploy my express api using heroku. When I try heroku local web --port 5001, it runs the api but it still uses port 8000 instead of the port given as I have the api listening on port 8000. How can I update my code so it uses the port passed in the Heroku local web command?
app.listen(8000, () => {
console.log("Server listening on port 8000")
});