deepstreamio-server-client-plugin
A plugin to expose a deepstream client on the server
Install
npm i -D deepstreamio-server-client-plugin
Usage
const server = ;
import clientPlugin, { extendPermissionHandler } from "deepstreamio-server-client-plugin"
const port = 6021;
const bytes = 64;
clientPlugin(server, port, bytes);
server.set('permissionHandler', extendPermissionHandler({
isValidUser: function(conn, auth, cb) {
},
canPerformAction: function(username, message, cb) {
}
}));
server.once('clientReady', () => {
});
Developing
This project uses the RISE yeoman generator. For development workflow,
see the workflow guide. Cheatsheet:
- Add code to
src/index.js
and tests to test/index.js
. - Lint, build and test a project with
npm run build
. - Build and watch changes in
src/
with npm run watch
- Run only tests with
npm run test
. - Check coverage with
npm run coverage
. - Generate a TOC for the
CHANGELOG
with npm run toc
- Deploy to a remote origin with
npm run deploy
. - Bump version and publish a package with
npm run major
or minor/patch
License
MIT © Chris Morrell