Fall back to port 3000 if none is specified
Originally, because `parseInt` can return `NaN`, sharkey would happily try to listen on port `NaN`.
This commit is contained in:
parent
12aeaa5f95
commit
e1b0faa18f
|
@ -256,7 +256,7 @@ export function loadConfig(): Config {
|
||||||
version,
|
version,
|
||||||
publishTarballInsteadOfProvideRepositoryUrl: !!config.publishTarballInsteadOfProvideRepositoryUrl,
|
publishTarballInsteadOfProvideRepositoryUrl: !!config.publishTarballInsteadOfProvideRepositoryUrl,
|
||||||
url: url.origin,
|
url: url.origin,
|
||||||
port: config.port ?? parseInt(process.env.PORT ?? '', 10),
|
port: config.port ?? parseInt(process.env.PORT ?? '3000', 10),
|
||||||
socket: config.socket,
|
socket: config.socket,
|
||||||
chmodSocket: config.chmodSocket,
|
chmodSocket: config.chmodSocket,
|
||||||
disableHsts: config.disableHsts,
|
disableHsts: config.disableHsts,
|
||||||
|
|
Loading…
Reference in New Issue