types of middle ware in express
1) application level middle ware
2) router level middle ware ( router = express.Router();)
3) error handling middle ware
4)build in middle ware
5) third party midelware
in above
thing
we are uisng express as app
calling get function
when get called we have to send some inputs as req, that api will send some outpits that is res
in next- after succesfull response what have to do
our code is running on sever 3000
k
then when go to person using get method in url
http://localhost:3000/person
it wil show perosn in dom
testing apis using
post man or arc tools
arc is like extension in crhome
visit below link
https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo/related
after runs the arc extension
run ur get url using
http://localhost:3000/person
arci it will show below response
write the json in person and print that using get method
for every change u have to run again node second.js
it will pring like below
{"name":"hudere","addr":"vamsi"}
No comments:
Post a Comment