summary refs log tree commit diff
path: root/bundle/src/BundledServer.ts
diff options
context:
space:
mode:
Diffstat (limited to 'bundle/src/BundledServer.ts')
-rw-r--r--bundle/src/BundledServer.ts41
1 files changed, 0 insertions, 41 deletions
diff --git a/bundle/src/BundledServer.ts b/bundle/src/BundledServer.ts
deleted file mode 100644
index 6951c1c4..00000000
--- a/bundle/src/BundledServer.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-process.on("unhandledRejection", console.error);
-process.on("uncaughtException", console.error);
-
-import http from "http";
-import { FosscordServer as APIServer } from "@fosscord/api";
-import { Server as GatewayServer } from "@fosscord/gateway";
-import { CDNServer } from "@fosscord/cdn/";
-import express from "express";
-import { Config } from "../../util/dist";
-
-const app = express();
-const server = http.createServer();
-const port = Number(process.env.PORT) || 8080;
-const production = true;
-server.on("request", app);
-
-// @ts-ignore
-const api = new APIServer({ server, port, production, app });
-// @ts-ignore
-const cdn = new CDNServer({ server, port, production, app });
-// @ts-ignore
-const gateway = new GatewayServer({ server, port, production });
-
-async function main() {
-	await Config.set({
-		cdn: {
-			endpointClient: "${location.host}",
-			endpoint: `http://localhost:${port}`,
-		},
-		gateway: {
-			endpointClient: '${location.protocol === "https:" ? "wss://" : "ws://"}${location.host}',
-			endpoint: `ws://localhost:${port}`,
-		},
-	});
-
-	await api.start();
-	await cdn.start();
-	await gateway.start();
-}
-
-main().catch(console.error);