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.
To connect the previously configured WebSocket listener, you have to create a context token first.
You can learn more about Marble.js Context mechanism here.
Then all you have to do is to register the defined module inside createServer dependencies
.
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.
If you are curious about other ways of bootstrapping the WebSocket server, reach out the Server events chapter.
Last updated