I'm wondering if this can be done with Node.js and express.js. On my incoming url i have parameters such as.
http://localhost:8080/restaurant.html?siteid=7&locationid=8&companyid=7
I want to extract the query and then append it to any incoming request
so that when the client code calls for my JSON and my router sends the request to
app.get('/siteinfo.json', function(req, res) {
console.log(company, site , location);
getdata_hdlr.get_site_setup(company, site , location);
});
I can pass the query params on to the function being called.
Can this be done or do I need to do this in my client code?