Add webRTC handlers
- Bind webRCT callbacks from socket
- Handle incoming account message for webRTC
GitLab: #53
Change-Id: I4ed28e7ca41e8e3870968819c75ffad249a188d0
diff --git a/server/src/app.ts b/server/src/app.ts
index f7c860a..4c1914b 100644
--- a/server/src/app.ts
+++ b/server/src/app.ts
@@ -22,6 +22,7 @@
import log from 'loglevel';
import { Service } from 'typedi';
+import { bindWebRTCCallbacks } from './handlers/webrtc-handler.js';
import { accountRouter } from './routers/account-router.js';
import { authRouter } from './routers/auth-router.js';
import { callRouter } from './routers/call-router.js';
@@ -49,6 +50,9 @@
app.use('/calls', callRouter);
app.use('/ns', nameserverRouter);
+ // Setup WebSocket callbacks
+ bindWebRTCCallbacks();
+
// Setup 404 error handling
app.use((_req, res) => {
res.sendStatus(HttpStatusCode.NotFound);