i

URL module

url module provides functions for URL resolution and parsing. For accessing the url module,

const url=require('url')

In the string, http://localhost:5200/user/password

/user/password is url.

Looking at a demo,

url-demo.js

As we know, req object retrieves values from the browser. Req.url attribute provides url provided in the  browser.

We are extracting parameters from the url.