2.2.1 • Published 7 years ago

feathers-primus v2.2.1

Weekly downloads
507
License
MIT
Repository
github
Last release
7 years ago

feathers-primus

Important: For Feathers v3.0.0 or later use the @feathersjs/primus module instead of feathers-primus.

Greenkeeper badge

Build Status Code Climate Test Coverage Dependency Status Download Status Slack 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}!`
    });
  }
});

License

Copyright (c) 2015

Licensed under the MIT license.

2.2.1

7 years ago

3.0.0-pre.2

7 years ago

3.0.0-pre.1

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.4.1

8 years ago

1.4.0

8 years ago

1.3.3

8 years ago

1.3.2

8 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago