How to do it...

I remember when some years ago, building a REST server could take days or weeks. You can use Feather.js, and it will be quick and (hopefully painless). Open a command line and install it through npm with the following command:

    npm install -g feathers-cli

After that, create a directory where you will run the server, go inside it, and launch Feathers:

    mkdir my-server    cd my-server    feathers generate app

Answer all the questions with default values. When the process finishes, type in the following command to create a new resource:

    feathers generate service

One of the questions is the name of the resource; call it messages, but other than that, use the default for all the other questions.

Exit from the feathers-cli with the ...

Get Vue.js 2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.