mirror of
https://github.com/spacebarchat/server.git
synced 2026-08-28 05:14:15 +00:00
Merge branch 'master' of https://github.com/fosscord/fosscord-api
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user