summary refs log tree commit diff
path: root/bundle/src
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-13 20:53:29 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-13 20:53:29 +0200
commit16eff151ea7d7f90c095f085d8e4a6d69e26dbe6 (patch)
tree7ee4ebf0162dbf7eb05ebcbe8f1888c2199d6332 /bundle/src
parent:bug: fix types + packages (diff)
downloadserver-16eff151ea7d7f90c095f085d8e4a6d69e26dbe6.tar.xz
:bug: fix dependencies and build for bundle
Diffstat (limited to 'bundle/src')
-rw-r--r--bundle/src/Server.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/bundle/src/Server.ts b/bundle/src/Server.ts
index 14abc128..19d9e168 100644
--- a/bundle/src/Server.ts
+++ b/bundle/src/Server.ts
@@ -22,12 +22,14 @@ const cdn = new CDNServer({ server, port, production, app });
 const gateway = new GatewayServer({ server, port, production });
 
 async function main() {
+	await Config.set({
+		cdn: { endpointClientKeepDefault: true, endpoint: `http://localhost:${port}` },
+		gateway: { endpointClientKeepDefault: true, endpoint: `ws://localhost:${port}` },
+	});
+
 	await api.start();
 	await cdn.start();
 	await gateway.start();
-
-	if (!Config.get().gateway.endpoint) await Config.set({ gateway: { endpoint: `ws://localhost:${port}` } });
-	if (!Config.get().cdn.endpoint) await Config.set({ cdn: { endpoint: `http://localhost:${port}` } });
 }
 
 main().catch(console.error);