Quick Start

Intro to FeathersJS

Mad ♥️ to Chris Pena for putting together the video.

Comprehensive Guide to FeathersJS with React

Mad ♥️ to Ben Awad for putting together an entire video series.

With NodeJS installed, you can quickly scaffold your first REST and real-time API by following these few steps.

ProTip: Make sure you have set up your development environment properly. We recommend node v5.x+.

  1. Install the Feathers CLI.

     $ npm install -g feathers-cli
  2. Create a directory for your new app.

     $ mkdir feathers-chat
     $ cd feathers-chat/
  3. Generate the app and confirm all the prompts with the default by pressing enter:

     $ feathers generate
  4. Generate a new service. When asked What do you want to call your service?, type message and confirm the other prompts with the default:

     $ feathers generate service

To exit the feathers command shell, press CTRL+C, twice.

  1. Start your brand new app! :boom:

     $ npm start
  2. Go to localhost:3030 to see the homepage. The message CRUD service is available at localhost:3030/messages

  3. Create a new message on the localhost:3030/messages endpoint. This can be done by sending a POST request with a REST client like Postman or via CURL like this:

     $ curl 'http://localhost:3030/messages/' -H 'Content-Type: application/json' --data-binary '{ "text": "Hello Feathers!" }'

Run in Postman

What's next?

In just a couple minutes we created a real-time API that is accessible via REST and websockets! We now have a database backed API that already provides CORS, authentication, pagination, logging, error handling and a few other goodies.

This is a great start! Let's take this a bit further and build our first real application.

ProTip: If you chose a different database than the default NeDB you will have to start the database server and make sure the connection can be established.

results matching ""

    No results matching ""