Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

feathers

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

feathers

An ultra scalable, feather weight, data oriented framework

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
393
decreased by-80.58%
Maintainers
2
Weekly downloads
 
Created
Source

Feathers

Let your web app fly.

Build Status

Feathers is a light weight web application framework that rides on top of Express. It makes it easy to create RESTful web services and real-time applications using socket.io.

The core focus of Feathers is your data. We believe that ultimately your app's purpose is to manage data in some fashion and so that's all you should really need to deal with. Managing your data.

Install

As with any NodeJS module, just install it as a dependency in your application:

npm install feathers --save

Getting Started Is Easy

Building an app with Feathers is easy. There are only 4 things to worry about. A wrapped express server, providers, services & middleware. Services are just simple modules that expose certain methods to the providers in order to CRUD your data. We can easily initialize a service that say... provides a single Todo:

var feathers = require('feathers');

var todoService = {
  get: function(name, params, callback) {
    callback(null, {
      id: name,
      description: "You have to do " + name + "!"
    });
  }
};

feathers()
	.configure(feathers.socketio())
	.use('/todo', todoService)
	.listen(8000);

That's all there really is to building an app with Feathers.

REST

You can access the REST service by going to http://localhost:8000/todo/dishes in your browser and will see:

{
  "id": "dishes",
  "description": "You have to do dishes!"
}

Note: Query parameters like http://localhost:8000/todo/dishes?type=dirty will be passed as params.query

SocketIO

Since we configured our app with feathers.socketio(), you can also connect to your service via SocketIO. Create an HTML page and insert the following code to see the response data logged on the console:

<script src="http://localhost:8000/socket.io/socket.io.js"></script>
<script>
  var socket = io.connect('http://localhost:8000/');
  socket.emit('todo::get', 'laundry', {}, function(error, data) {
    console.log(data); // -> { id: 'laundry', description: 'You have to do laundry!' }
  });
</script>

What's next?

Head over to the Feathers website at feathersjs.com for more examples and the detailed documenation.

Keywords

FAQs

Package last updated on 27 Sep 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc