★ wanayoo — archive 1999 https://github.com/feathersjs/feathers-primusNouvelle recherche | Portail wanayoo
Skip to content
Learn more
Please note that GitHub no longer supports Internet Explorer versions 7 or 8.

We recommend upgrading to the latest Internet Explorer, Google Chrome, or Firefox.

If you are using IE 11, make sure you turn off "Compatibility View".

The Feathers Primus real-time API provider
JavaScript
Find file
Latest commit c1aae77 @ekryski ekryski Merge pull request #11 from feathersjs/greenkeeper-primus-5.0.1
Update primus to version 5.0.1 πŸš€

README.md

feathers-primus

Build Status

The Feathers Primus real-time API provider

About

This provider exposes Feathers services through Primus real-time APIs. It is compatible with Feathers 1.x and 2.x.

Note: For the full API documentation go to feathersjs.com/docs/providers.html.

Quick example

npm install ws

import feathers from 'feathers';
import primus from 'feathers-primus';

const app = feathers()
  .configure(primus({
    transformer: 'websockets'
  }, function(primus) {
    // Set up Primus authorization here
    primus.authorize(function (req, done) {
      req.feathers.data = 'Hello world';

      done();
    });
  }));

app.use('/todos', {
  get: function(id, params) {
    console.log(params.data); // -> 'Hello world'

    return Promise.resolve({
      id,
      description: `You have to do ${name}!`
    });
  }
});

Changelog

1.2.0

1.1.0

  • Added Primus client and browser mapping for universal module usage

1.0.0

  • Initial release of extracted module from Feathers 1.3

License

Copyright (c) 2015

Licensed under the MIT license.

Something went wrong with that request. Please try again.