basic websocket support for fastify
Switch branches/tags
Nothing to show
Clone or download
mcollina Merge pull request #17 from fastify/greenkeeper/standard-12.0.0
Update standard to the latest version 🚀
Latest commit 4bf806b Aug 29, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit Jun 3, 2017
.travis.yml travis: npm install instead of npm ci Jul 10, 2018
LICENSE Initial commit Jun 3, 2017
README.md docs(readme): add Greenkeeper badge Jun 4, 2017
index.js Updates dependencies, plugin-meta Jan 21, 2018
package-lock.json 0.2.0 Jan 22, 2018
package.json chore(package): update standard to version 12.0.0 Aug 29, 2018
test.js Initial implementation Jun 4, 2017

README.md

fastify-websocket

Greenkeeper badge

WebSocket support for Fastify. Built upon websocket-stream.

Example

'use strict'

const fastify = require('fastify')()

fastify.register(require('fastify-websocket'), { handle })

function handle (conn) {
  conn.pipe(conn) // creates a echo server
}

fastify.listen(0)

TODO

  • Support Hooks?

Acknowledgements

This project is kindly sponsored by nearForm.

License

Licensed under MIT.