feathersjs-ecosystem / primus-client

[MOVED] Client services for Primus and feathers-primus

Home Page:https://github.com/feathersjs/feathers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@feathersjs/primus-client

Important: The code for this module has been moved into the main Feathers repository at feathersjs/feathers (package direct link). Please open issues and pull requests there. No changes in your existing Feathers applications are necessary.

Build Status

Client services for Primus and feathers-primus

Installation

npm install @feathersjs/primus-client --save

Quick usage:

const feathers = require('@feathersjs/feathers');
const primus = require('@feathersjs/primus-client');
const socket = new Primus('http://api.my-feathers-server.com');

const app = feathers();

app.configure(primus(socket));

// Receive real-time events through Primus
app.service('messages')
  .on('created', message => console.log('New message created', message));

// Call the `messages` service
app.service('messages').create({
  text: 'A message from a REST client'
});

Documentation

Please refer to the @feathersjs/primus-client documentation for more details.

License

Copyright (c) 2018

Licensed under the MIT license.

About

[MOVED] Client services for Primus and feathers-primus

https://github.com/feathersjs/feathers

License:MIT License


Languages

Language:JavaScript 100.0%