0.4.0 • Published 5 years ago

fastify-wamp-router v0.4.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

fastify-wamp-router

js-standard-style Build Status Greenkeeper badge Known Vulnerabilities Coverage Status npm npm

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.

Versions

:warning: Please, bear in mind, that wamp-server depends on ws@6.x which requires >=node@7.5.

versionbranchfastifywapm-serverwsend of support
0.3.x0.3.x1.x0.0.96.x2019-09-01
>=0.4.0master2.x0.0.96.xTBD

Install

$ npm i --save fastify-wamp-router 

Example

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.

Reference

  • port {number} The port of the websocket connection.
  • realms {array|string} The name(s) of the realm(s).

Debugging

You can use the DEBUG=wamp:* environment variable.

License

Licensed under MIT.