diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-13 20:54:59 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-13 20:54:59 +0200 |
commit | f70a24ab6a5c8174c7d417e1c4c0400c0c4bebcb (patch) | |
tree | 8759e61a5a1851dd0e2313ebd1cb69705afbb969 /bundle/src | |
parent | :pencil: update readme (diff) | |
parent | :bug: fix dependencies and build for bundle (diff) | |
download | server-f70a24ab6a5c8174c7d417e1c4c0400c0c4bebcb.tar.xz |
Merge branch 'master' of https://github.com/fosscord/fosscord-api
Diffstat (limited to 'bundle/src')
-rw-r--r-- | bundle/src/Server.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bundle/src/Server.ts b/bundle/src/Server.ts index aceabb99..68966bf4 100644 --- a/bundle/src/Server.ts +++ b/bundle/src/Server.ts @@ -21,12 +21,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); |