Add WebSocket transport
This commit is contained in:
+3
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user