const http = require('http');
const url = require('url');
http.createServer(function (req, res) {
const queryObject = url.parse(req.url,true).query;
console.log(queryObject);
res.writeHead(200, {'Content-Type': 'text/html'});
res.end("end");
}).listen(8080);
// To run open http://localhost:8080/?age=48&name=Tom in your web browser
/*
run:
[Object: null prototype] { age: '48', name: 'Tom' } // output (console)
end // in web browser
*/