GithubHelp home page GithubHelp logo

bmorelax / feathers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from feathersjs/feathers

0.0 0.0 0.0 6.44 MB

A REST and realtime API layer for modern applications.

Home Page: https://feathersjs.com

License: MIT License

JavaScript 95.44% HTML 4.56%

feathers's Introduction

Feathers logo

A REST and realtime API layer for modern applications.

Greenkeeper badge Build Status Maintainability Test Coverage Download Status

Slack Status Telegram Status

Sauce Test Status

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.

Support

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Getting started

You can build your first real-time and REST API in just 4 commands:

$ npm install -g @feathersjs/cli
$ mkdir my-new-app
$ cd my-new-app/
$ feathers generate app
$ npm start

To learn more about Feathers visit the website at feathersjs.com or jump right into the Feathers docs.

See it in action

Here is all the code you need to create a RESTful, real-time message API that uses an in-memory data store:

const feathers = require('@feathersjs/feathers');
const express = require('@feathersjs/express');
const socketio = require('@feathersjs/socketio');

const memory = require('feathers-memory');

// Creates an Express compatible Feathers application
const app = express(feathers());

// Parse HTTP JSON bodies
app.use(express.json());
// Parse URL-encoded params
app.use(express.urlencoded({ extended: true }));
// Add REST API support
app.configure(express.rest());
// Configure Socket.io real-time APIs
app.configure(socketio());
// Register a messages service with pagination
app.use('/messages', memory({
  paginate: {
    default: 10,
    max: 25
  }
}));
// Register a nicer error handler than the default Express one
app.use(express.errorHandler());

// Add any new real-time connection to the `everybody` channel
app.on('connection', connection => app.channel('everybody').join(connection));
// Publish all events to the `everybody` channel
app.publish(data => app.channel('everybody'));

// Start the server
app.listen(3030).on('listening', () =>
  console.log('Feathers server listening on localhost:3030')
);

Then run

npm install @feathersjs/feathers @feathersjs/socketio @feathersjs/express feathers-memory
node app

and go to http://localhost:3030/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.

Documentation

The Feathers docs are loaded with awesome stuff and tell you every thing you need to know about using and configuring Feathers.

Security

We ❤️ the community and take security very seriously. No one wants their app hacked. If you have come across a security concern please report it responsibly. Visit the Security section of the docs to learn more about how you can make sure your app is secure.

License

Copyright (c) 2018 Feathers contributors

Licensed under the MIT license.

feathers's People

Contributors

daffl avatar ekryski avatar greenkeeper[bot] avatar marshallswain avatar greenkeeperio-bot avatar corymsmith avatar bertho-zero avatar glavin001 avatar j2l4e avatar loris avatar kc-dot-io avatar abraaoalves avatar superbarne avatar eddyystop avatar larkinscott avatar whollacsek avatar vodnicearv avatar sylvainlap avatar myknbani avatar ncmbch avatar nsainaney avatar michaelermer avatar mlaug avatar ekoeryanto avatar codingfriend1 avatar saiichihashimoto avatar elfey avatar superlazycoder avatar micaksica2 avatar luke3butler avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.