Assuming node.js and express.js.
Register the route in your application.
server.js:
... app.get('/myservice/:CustomerId', myservice.queryByCustomer); ....
Deploy the service using req.params for the passed in Id.
routes /myservice.js:
exports.queryByCustomer = function(req, res) { var queryBy = req.params.CustomerId; console.log("Get the data for " + queryBy);
Jess source share