Add WebSocket transport

This commit is contained in:
2026-07-27 09:32:54 +00:00
parent 69fc23a4c1
commit 5bc79c47e8
5 changed files with 447 additions and 1 deletions
+3 -1
View File
@@ -3,6 +3,7 @@ import { Database, MigrationService } from './services/storage/index.ts';
import { Broadcaster } from './services/broadcaster.ts';
import { ApplicationRouter } from './services/router.ts';
import { HttpTransportRouter } from './services/transport/http-transport.ts';
import { WsTransportRouter } from './services/transport/ws-transport.ts';
import { ServerHost } from './services/server-host.ts';
import { Logger } from './utils/logger.ts';
@@ -31,7 +32,8 @@ export class App {
const router = await ApplicationRouter.create(routes);
const http = new HttpTransportRouter(router, debug);
const host = new ServerHost(config, debug, [http]);
const ws = new WsTransportRouter(router, debug, config.server.maxRequestBodyBytes);
const host = new ServerHost(config, debug, [http, ws]);
return new App(host, database);
}