Can we get the variables in the query string in Node.js just like we get them in $_GET in PHP?
$_GET
I know that in Node.js we can get the URL in the request.
I learned from the other answers and decided to use this code throughout my site:
var query = require('url').parse(req.url,true).query;
Then you can just call
var id = query.id; var option = query.option;
where the URL for get should be
/path/filename?id=123&option=456