fix apiBase initialization on main (#3595)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2021-08-12 10:34:45 +03:00
1 parent 37ec55c243
commit 443186d4f5
3 files changed
+21 -10

No files matched your search

+2 -1
View File
@@ -30,6 +30,7 @@ import logger from "./logger";
import { Singleton } from "../common/utils";
import type { Cluster } from "./cluster";
import type { ProxyApiRequestArgs } from "./proxy-functions";
import { appEventBus } from "../common/event-bus";
type GetClusterForRequest = (req: http.IncomingMessage) => Cluster | null;
@@ -97,7 +98,7 @@ export class LensProxy extends Singleton {
});
this.port = port;
process.env.LENS_PROXY_PORT = port.toString();
appEventBus.emit({ name: "lens-proxy", action: "listen", params: { port }});
resolve();
})
.once("error", (error) => {