From 729fdd04b7067d9885d2ec59304c935dc54dc936 Mon Sep 17 00:00:00 2001 From: chenos Date: Wed, 27 Sep 2023 15:30:25 +0800 Subject: [PATCH] feat: add SOCKET_PATH env --- packages/core/server/src/gateway/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/server/src/gateway/index.ts b/packages/core/server/src/gateway/index.ts index 9f06ab520..75be962b8 100644 --- a/packages/core/server/src/gateway/index.ts +++ b/packages/core/server/src/gateway/index.ts @@ -54,6 +54,9 @@ export class Gateway extends EventEmitter { private constructor() { super(); this.reset(); + if (process.env.SOCKET_PATH) { + this.socketPath = xpipe.eq(resolve(process.cwd(), process.env.SOCKET_PATH)); + } } public static getInstance(options: any = {}): Gateway {