It is easy to build Rest API using the express framework in node.js. But if you want to build a realtime application the change in the database reflects suddenly to the users then implementing socket.io you can make it but it is quite hard to implement the realtime feature, here comes the easy solution for you feathers js.
It is a framework for real-time application and for making the rest API at no cost. this will provide a real backend framework where the code structure has maintained you easily build an application with minimum efforts. It supports databases like mongoose, post grays, almost every database.
TO start with feathers backend you have to start with installing the feathers-cli, which is a command-line interface tool that helps you to generate an application.
then it going to ask you question which database you like to implement
would you like to use the user authentication?
after some questions, it will go to generate an app for you.
it has 3 main things in the src folder where 90% of our work we do.
=> model Folder
=> hooks folder
Models: the model folder contains the model of your data you want to use in your project which is linked to your preferred databases. when you create any service it is going to automatically generate.
Hooks: Hooks are the functions that are implemented before, after, or error the application. hooks have the context
of an object that contains the app, user-related data that can be manipulated before and after the data used. you can create a hook by running
feathers generate hook It will generate a hook
Services: Services contain the whole application rest API operation done through the services. you can make a change in the services to manipulate the data of the API. you can generate service by running the command
feathers generate service
Feathers is easy to learn to go through the documentation for a clear understanding.