diff --git a/bundle/package.json b/bundle/package.json
index 484c0f05..3eb49719 100644
--- a/bundle/package.json
+++ b/bundle/package.json
@@ -66,6 +66,7 @@
"@fosscord/api": "file:../api",
"@fosscord/cdn": "file:../cdn",
"@fosscord/gateway": "file:../gateway",
+ "@fosscord/webrtc": "file:../webrtc",
"@sentry/node": "^6.16.1",
"@sentry/tracing": "^6.16.1",
"@yukikaze-bot/erlpack": "^1.0.1",
diff --git a/bundle/scripts/build.js b/bundle/scripts/build.js
index f73fb11a..06e01e2f 100644
--- a/bundle/scripts/build.js
+++ b/bundle/scripts/build.js
@@ -7,7 +7,7 @@ const { argv } = require("process");
var steps = 2, i = 0;
if (argv.includes("clean")) steps++;
if (argv.includes("copyonly")) steps--;
-const dirs = ["api", "util", "cdn", "gateway", "bundle"];
+const dirs = ["api", "util", "cdn", "gateway", "bundle", "webrtc"];
const verbose = argv.includes("verbose") || argv.includes("v");
diff --git a/bundle/src/Server.ts b/bundle/src/Server.ts
index df29266d..2fbba318 100644
--- a/bundle/src/Server.ts
+++ b/bundle/src/Server.ts
@@ -4,6 +4,7 @@ process.on("uncaughtException", console.error);
import http from "http";
import * as Api from "@fosscord/api";
import * as Gateway from "@fosscord/gateway";
+import * as WebRTC from "@fosscord/webrtc";
import { CDNServer } from "@fosscord/cdn";
import express from "express";
import { green, bold, yellow } from "picocolors";
@@ -17,12 +18,10 @@ const port = Number(process.env.PORT) || 3001;
const production = process.env.NODE_ENV == "development" ? false : true;
server.on("request", app);
-// @ts-ignore
const api = new Api.FosscordServer({ server, port, production, app });
-// @ts-ignore
const cdn = new CDNServer({ server, port, production, app });
-// @ts-ignore
const gateway = new Gateway.Server({ server, port, production });
+const webrtc = new WebRTC.Server({ server, port, production });
//this is what has been added for the /stop API route
process.on('SIGTERM', () => {
@@ -93,7 +92,7 @@ async function main() {
});
}
- await Promise.all([api.start(), cdn.start(), gateway.start()]);
+ await Promise.all([api.start(), cdn.start(), gateway.start(), webrtc.start()]);
console.log(`[Server] ${green(`listening on port ${bold(port)}`)}`);
}
diff --git a/bundle/tsconfig.json b/bundle/tsconfig.json
index 57fe10ad..1a1aa0bf 100644
--- a/bundle/tsconfig.json
+++ b/bundle/tsconfig.json
@@ -77,7 +77,8 @@
"@fosscord/api": ["api/src/index"],
"@fosscord/gateway": ["gateway/src/index"],
"@fosscord/cdn": ["cdn/src/index"],
- "@fosscord/util": ["util/src/index"]
+ "@fosscord/util": ["util/src/index"],
+ "@fosscord/webrtc": ["webrtc/src/index"]
},
"plugins": [{ "transform": "@zerollup/ts-transform-paths" }],
"noEmitHelpers": true,
|