primus-uuid
uuid and authorization plugin for primus
Example
Because code says more than a thousand words (at least sometimes)...
primus; // use authorizeData instead of authorize// note that done(err) is done(err, data) hereprimus; primus;
Run node example.js
to test this code. (don't forget to npm install primus ws
first)
Example output:
> node example.js
go to http://localhost:1337 to see the example in action
req uuid 308540f6-b387-4d97-9e5a-8ba4e26ba5b9
spark data test
spark uuid 308540f6-b387-4d97-9e5a-8ba4e26ba5b9