Skip to content

attachSocketIOBridge

attachSocketIOBridge(io, app): void

Defined in: src/plugins/application/socket-io.ts:19

Attaches the Shokupan HTTP Bridge and Event System to a Socket.IO server. This makes the Shokupan HTTP APIs accessible via Socket.IO events.

Send events as shokupan:request events with the payload { type: “http”, id: “123”, body: {} }.

Responses are emitted as shokupan:response events with the payload { id, status, body }

Server

The Socket.IO server instance

Shokupan

The Shokupan application instance

void