feat: add SOCKET_PATH env

This commit is contained in:
chenos 2023-09-27 15:30:25 +08:00
parent f02023db61
commit 729fdd04b7

View File

@ -54,6 +54,9 @@ export class Gateway extends EventEmitter {
private constructor() { private constructor() {
super(); super();
this.reset(); this.reset();
if (process.env.SOCKET_PATH) {
this.socketPath = xpipe.eq(resolve(process.cwd(), process.env.SOCKET_PATH));
}
} }
public static getInstance(options: any = {}): Gateway { public static getInstance(options: any = {}): Gateway {