
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Let your web app fly.
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.
As with any NodeJS module, just install it as a dependency in your application:
npm install feathers --save
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.
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 asparams.query
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>
Head over to the Feathers website at feathersjs.com for more examples and the detailed documenation.
FAQs
Build Better APIs, Faster than Ever.
The npm package feathers receives a total of 1,223 weekly downloads. As such, feathers popularity was classified as popular.
We found that feathers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.