# fastify-wamp-router

> Web Application Messaging Protocol router for fastify

Latest version **0.4.0** (published 2019-08-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install fastify-wamp-router
pnpm add fastify-wamp-router
yarn add fastify-wamp-router
bun add fastify-wamp-router
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2019-08-01 |
| First published | 2018-06-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=7.5.0 |
| Dependencies | 2 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Ákos Kovács |
| Maintainers | lependu |
| Keywords | node.js, fastify, wamp, publish, subscribe, rpc, dealer, broker |

## Links

- npm: https://www.npmjs.com/package/fastify-wamp-router
- Repository: https://github.com/lependu/fastify-wamp-router
- Homepage: https://github.com/lependu/fastify-wamp-router#readme
- Issues: https://github.com/lependu/fastify-wamp-router/issues
- npm.io page: https://npm.io/package/fastify-wamp-router

## Dependencies (2)

- [wamp-server](https://npm.io/package/wamp-server.md) 0.0.9
- [fastify-plugin](https://npm.io/package/fastify-plugin.md) ^1.6.0

## Recent versions

- 0.4.0 (latest) — 2019-08-01
- 0.3.0 — 2019-08-01
- 0.2.0 — 2018-10-02
- 0.1.0 — 2018-06-27

## README

# fastify-wamp-router

[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)
[![Build Status](https://travis-ci.org/lependu/fastify-wamp-router.svg?branch=master)](https://travis-ci.org/lependu/fastify-wamp-router)
[![Greenkeeper badge](https://badges.greenkeeper.io/lependu/fastify-wamp-router.svg)](https://greenkeeper.io/)
[![Known Vulnerabilities](https://snyk.io/test/github/lependu/fastify-wamp-router/badge.svg)](https://snyk.io/test/github/lependu/fastify-wamp-router)
[![Coverage Status](https://coveralls.io/repos/github/lependu/fastify-wamp-router/badge.svg?branch=master)](https://coveralls.io/github/lependu/fastify-wamp-router?branch=master)
![npm](https://img.shields.io/npm/v/fastify-wamp-router.svg)
![npm](https://img.shields.io/npm/dm/fastify-wamp-router.svg)


WAMP *(Web Application Messaging Protocol)* router for fastify.
Under the hood it shares [ivaylopivanov/wamp-server](https://github.com/ivaylopivanov/wamp-server) instance,
which implements [Basic Profife](https://tools.ietf.org/html/draft-oberstet-hybi-tavendo-wamp-02#page-7)
following [WAMP](https://tools.ietf.org/html/draft-oberstet-hybi-tavendo-wamp-02) 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`.

| version | branch | fastify | wapm-server | ws | end of support |
|---------|--------|---------|-------------|----|----------------|  
|`0.3.x`  | [0.3.x](https://github.com/lependu/fastify-wamp-router/tree/0.3.x) | [1.x](https://github.com/fastify/fastify/tree/1.x) | [0.0.9](https://github.com/ivaylopivanov/wamp-server) | [6.x](https://github.com/websockets/ws) | 2019-09-01 |
|`>=0.4.0`| [master](https://github.com/lependu/fastify-wamp-router) | [2.x](https://github.com/fastify/fastify) | [0.0.9](https://github.com/ivaylopivanov/wamp-server) | [6.x](https://github.com/websockets/ws) |      TBD     |

## Install
```
$ npm i --save fastify-wamp-router 
```

## Example
```js
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](https://github.com/crossbario/autobahn-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](./LICENSE).

---
_Source: https://npm.io/package/fastify-wamp-router · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
