Skip to content

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

@MathurAditya724

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions