Getting started
Installation
or if you are a hipster:
Bootstrapping
Like httpListener the WebSocket module defines a similar way of bootstrapping the app. The webSocketListener includes definitions of all middlewares and WebSocket effects.
webSocket.listener.ts
To connect the previously configured WebSocket listener, you have to create a context token first.
tokens.ts
Then all you have to do is to register the defined module inside createServer dependencies
.
index.ts
You can create and run a WebSocket server by providing the port value in webSocketListener
config object. You can also upgrade the currently running http server by providing noServer: true
in config object or by ommiting it.
Last updated