Build Better APIs, Faster than Ever.
Feathers is a real-time, micro-service web framework for NodeJS that gives you control over your data via RESTful resources, sockets and flexible plug-ins.
You can build your first real-time API in just 4 commands:
$ npm install -g feathers-cli$ mkdir my-new-app$ cd my-new-app/$ feathers generate$ npm start
Here is all the code you need to create a RESTful, real-time message API that uses an in-memory data store:
// app.jsconst feathers = require'feathers';const rest = require'feathers-rest';const socketio = require'feathers-socketio';const memory = require'feathers-memory';const bodyParser = require'body-parser';const handler = require'feathers-errors/handler';// A Feathers app is the same as an Express appconst app = feathers;// Add REST API supportappconfigurerest;// Configure Socket.io real-time APIsappconfiguresocketio;// Parse HTTP JSON bodiesappusebodyParserjson;// Parse URL-encoded paramsappusebodyParserurlencoded extended: true ;// Register our memory "messages" serviceappuse'/messages' memory;// Register a nicer error handler than the default Express oneappusehandler;// Start the serverapplisten3000;
npm install feathers feathers-rest feathers-socketio feathers-errors feathers-memory body-parsernode app
and go to http://localhost:3000/messages. That's it! There's a lot more you can do with Feathers including; using a real database, authentication, authorization, clustering and more! Head on over to the Feathers docs to see just how easy it is to build scalable real-time apps.
The Feathers docs are loaded with awesome stuff and tell you every thing you need to know about using and configuring Feathers.
Each plugin has it's own minimal example in the repo. To see some more complex examples go to feathersjs/feathers-demos.