Skip to content

API reference / @chanx-js/server / node / attachChanx

Function: attachChanx() ​

ts
function attachChanx(
   server, 
   chanx, 
   __namedParameters?
): Attachment;

Defined in: packages/server/src/adapters/node.ts:34

Serve chanx on a Node HTTP server: plain http, or the one Express, Fastify, Koa or NestJS (app.getHttpServer()) runs on. Upgrades for other paths go to the server's other WebSocket servers; those attached before chanx never see chanx's paths.

Parameters ​

ParameterType
serverServer
chanxChanx
__namedParametersSocketOptions

Returns ​

Attachment

MIT licensed