WAMP (Web Application Messaging Protocol) router for fastify.
Under the hood it shares ivaylopivanov/wamp-server instance,
which implements Basic Profife
following WAMP standards.
The options that you pass to register
will be passed to the wamp-server
.
⚠️ Please, bear in mind, thatwamp-server
depends on[email protected]
which requires>[email protected]
.
version | branch | fastify | wapm-server | ws | end of support |
---|---|---|---|---|---|
0.3.x |
0.3.x | 1.x | 0.0.9 | 6.x | 2019-09-01 |
>=0.4.0 |
master | 2.x | 0.0.9 | 6.x | TBD |
$ npm i --save fastify-wamp-router
const Fastify = require('fastify')
const fastifyWamp = require('fastify-wamp-router')
const fastify = Fastify()
fastify.register('fastify-wamp', {
port 3443,
realms: ['fastify.wamp.pubsub', 'fastify.wamp.rpc'],
}
fastify.listen(3000)
You can connect to the router with any authobahn.js compatible library.
port
{number}
The port of the websocket connection.realms
{array|string}
The name(s) of the realm(s).
You can use the DEBUG=wamp:*
environment variable.
Licensed under MIT.