fix(api-server): use ipc instead of ipcMain

This commit is contained in:
JellyBrick
2025-09-07 12:47:08 +09:00
parent 5ecd39f324
commit 336b7fe5e9
2 changed files with 14 additions and 8 deletions

View File

@ -70,6 +70,7 @@ export const backend = createBackend<BackendType, APIServerConfig>({
// Custom
init(backendCtx) {
this.app = new Hono();
const ws = createNodeWebSocket({
app: this.app,
});
@ -121,7 +122,7 @@ export const backend = createBackend<BackendType, APIServerConfig>({
() => this.volumeState,
);
registerAuth(this.app, backendCtx);
registerWebsocket(this.app, ws);
registerWebsocket(this.app, backendCtx, ws);
// swagger
this.app.openAPIRegistry.registerComponent(