Setting the Routes

In this section we would define the routes of each endpoint used. Routes are nothing but the HTTP methods (GET, POST, PATCH, DELETE) which it can perform.

The routes are mentioned in the routes/route1.js file.

In the above snippet each function does a single HTTP method. For GET and DELETE you can use the same code. For POST method, you have to change the contents of tableName({...}). You need to add the headers used in your database table. 

Discussion
Amazing! It literally would take just 15 minutes :)

2

Thank you Arpan.

1

20

1