feat(gateway): allow webchat port override
This commit is contained in:
1 parent
e9fd73141d
commit
93a5784c58
4 files changed
+28
-6
No files matched your search
@@ -160,10 +160,12 @@ export async function __broadcastGatewayEventForTests() {
|
||||
// no-op
|
||||
}
|
||||
|
||||
export async function ensureWebChatServerFromConfig() {
|
||||
export async function ensureWebChatServerFromConfig(
|
||||
overridePort?: number,
|
||||
) {
|
||||
const cfg = loadConfig();
|
||||
if (cfg.webchat?.enabled === false) return null;
|
||||
const port = cfg.webchat?.port ?? WEBCHAT_DEFAULT_PORT;
|
||||
const port = overridePort ?? cfg.webchat?.port ?? WEBCHAT_DEFAULT_PORT;
|
||||
try {
|
||||
return await startWebChatServer(port);
|
||||
} catch (err) {
|
||||
|
||||
Reference in new issue
Block a user