Skip to content

Commit 23e39aa

Browse files
Merge pull request #1280 from qbikez/port-as-pipe
[INTERNAL] Allow for non-number port (i.e. pipe)
2 parents ec9bbce + bcd6839 commit 23e39aa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/registry/domain/options-sanitiser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default function optionsSanitiser(input: Input): Config {
6868
options.customHeadersToSkipOnWeakVersion || []
6969
).map(s => s.toLowerCase());
7070

71-
options.port = Number(process.env['PORT'] || options.port);
71+
options.port = options.port || process.env['PORT'] || 3000;
7272
options.timeout = options.timeout || 1000 * 60 * 2;
7373
options.keepAliveTimeout =
7474
options.keepAliveTimeout || DEFAULT_NODE_KEEPALIVE_MS;

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export interface Config {
132132
path: string;
133133
plugins: Record<string, (...args: unknown[]) => void>;
134134
pollingInterval: number;
135-
port: number;
135+
port: number | string;
136136
postRequestPayloadSize?: number;
137137
prefix: string;
138138
publishAuth?: {

0 commit comments

Comments
 (0)