Skip to content

Commit

Permalink
fix: use process.env.PORT as default value if port option is miss…
Browse files Browse the repository at this point in the history
…ing (#27)
  • Loading branch information
farnabaz committed Jan 2, 2023
1 parent 4b7b320 commit 57e1232
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -39,7 +39,7 @@ export async function getPort (config: GetPortInput = {}): Promise<PortNumber> {
host: undefined,
verbose: false,
...config,
port: Number.parseInt(process.env.PORT || "") || config.port || 3000
port: config.port || Number.parseInt(process.env.PORT || "") || 3000
} as GetPortOptions;

if (options.random) {
Expand Down

0 comments on commit 57e1232

Please sign in to comment.