I am writing a web app in node.js using Express. I have defined a route as follows:
app.get(\"/firstService/:query\", function(req,res){ //trivial exampl
You can use run-middleware module exactly for that
run-middleware
app.runMiddleware('/firstService/query',function(responseCode,body,headers){ // Your code here })
More info:
Disclosure: I am the maintainer & first developer of this module.