Skip to content

feat: Check process.env.PORT var also before defaulting to 3000 #281

Description

@MathurAditya724

This is more of a question/discussion

Should we also check the value of process.env.PORT value?

That is on this line - https://github.com/honojs/node-server/blob/main/src/server.ts#L25

We do -

options?.port ?? process.env.PORT ? Number.parseInt(process.env.PORT, 10) : 3000

I believe PORT is a general env variable for defining the port for a server in js ecosystem.

Feel free to close it if this doesn't seems necessary, happy to create a PR for this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions