This is a client for the PuSu Engine written in Go. PuSu Engine is a Pub-Sub engine.
More information on the server repository at https://github.com/PuSuEngine/pusud.
bower install pusu There is an usage example in tests/test_example.html, but here's the short version (for use in a browser):
var client = new PuSu("ws://127.0.0.1:55000"); client.connect().promise.then(function () { client.authorize("foo").promise.then(function () { client.subscribe("channel.1", function(msg) { console.log(msg); }); client.publish("channel.2", {"foo": ["bar"]}) }); });To build this, you'll want to do the following:
npm install -g gulp npm install gulpYou'll get dist/pusu.js as the end result.
The project is using npm-lockdown to try and avoid some issues with NPM.
Basically if you update/add dependencies you should run npm run relock and commit changes to package.json + lockdown.json.
(This doesn't happen often so it's easy to forget)
- Update new version number in package.json
- Commit a new tag pointing to the correct revision
Short version: MIT + New BSD.
Long version: Read the LICENSE.md -file.
Includes typescript-deferred from https://github.com/DirtyHairy/typescript-deferred which uses the MIT license.