jasveer123 / rest_api

This is a example of how implement the rest api in the node js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rest_api

In this activity i make a rest api using node.js express.js mongodb and mongoose

steps to use the api

requirments: mongodb and postman

1.) clone the uppar repo and run the node app by using

-nodemon app.js

Screenshot from 2021-08-01 17-03-23

2.)Now with postman make a new post request request

-localhost:3000/mens (because i use in the local host)

Screenshot from 2021-08-03 16-53-37

3.)The data will stored in the database looks like this

Screenshot from 2021-08-03 16-53-28

4.)now using the get req get the data the data after applying algorithm looks like (we can used by id or simply get all data) the respose will show as

Screenshot from 2021-08-03 17-14-19

About

This is a example of how implement the rest api in the node js


Languages

Language:JavaScript 100.0%