Question - How does the URL module work?
Answer -
This module helps URL to parse it into host, pathname, search, query, etc.
Example:
var url = require('url');
var adr = 'https://mindmajix.com/?s=node+js+training';
var q = url.parse(adr, true);
console.log(q.host); //returns 'mindmajix.com'
console.log(q.search); //returns '?s=node+js+training'