Skip to content
Client side Feathers for REST and websockets that works with NodeJS, React Native and any client framework
JavaScript HTML

readme.md

feathers-client

Build Status

A client for Feathers services supporting many different transport libraries.

About

While Feathers and its modules can be used on the client with an NPM compatible module loader like Browserify, Webpack or StealJS, feathers-client consolidates a standard set of client plugins into a single distributable that can be used standalone in the browser or with other module loaders (like RequireJS) that don't support NPM. The following modules are included:

  • feathers as feathers (or the default module export)
  • feathers-hooks as feathers.hooks
  • feathers-rest as feathers.rest
  • feathers-socketio as feathers.socketio
  • feathers-primus as feathers.primus

In the browser a client that connects to the local server via websockets can be initialized like this:

<script type="text/javascript" src="/socket.io/socket.io.js"></script>
<script type="text/javascript" src="//cdn.rawgit.com/feathersjs/feathers-client/v1.0.0/dist/feathers.js"></script>
<script type="text/javascript">
  var socket = io();
  var app = feathers()
    .configure(feathers.hooks())
    .configure(feathers.socketio(socket));
  var todoService = app.service('todos');

  todoService.on('created', function(todo) {
    console.log('Someone created a todo', todo);
  });

  todoService.create({
    description: 'Todo from client'
  });
</script>

For the full documentation see the Feathers documentation.

Changelog

1.0.0

  • Migration to a consolidation module for universal Feathers and its plugins

0.5.0

  • Adding React Native fetch plugin

0.4.0

  • updating dependencies

0.3.0

  • Migrating to ES6 and use with Promises (#7)

0.2.0

  • Make client use feathers-commons

0.1.0

  • Initial release

Author

License

Copyright (c) 2015 David Luecke

Licensed under the MIT license.

Something went wrong with that request. Please try again.