In simple terms a REST Api is an API on a backend which you make a call to from the frontend/client side, telling it what you want and it returns your data.
A very simple example is as follows: Let’s say you have a database with a bunch of product data in. You want a list of products that is cheaper than $200. You make a call to the API from the frontend. The API queries the database and returns a list of products cheaper than $200. Very simple right! You can create very complex APIs, but most of the time you’ll only need a very simple one. It’s most commonly used to query and return data from a database.
Just to summarize, the steps are:
Just quickly before we start. What is Express.js?
Express is a backend web framework for Node.js which you can use to easily make an API
#api #nodejs #javascript #expressjs