Skip to content

"Mean" behavior: express does not complain if the port is undefined #3364

@paulbrie

Description

@paulbrie
app.listen(process.env.PORT, function () {
  console.log(`Server is running on port ${port}`)
})

In my case, process.env.PORT was not defined and ${port} was. Therefore I was having the impression that the server was running on the port displayed into the console.

It would be great if a check was done on the port parameter. Is there a specific reason why it's not?

Thanks,
Paul

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions