get value from path variable node js

Solutions on MaxInterview for get value from path variable node js by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "get value from path variable node js"
Laura
21 Aug 2017
1exports.doIt = function(req, res, next) {
2    var group = new Group(req.body);
3
4    console.log(req.params);
5
6    group.userId = req.params.userId;
7
8    group.save(new dataCallbacks(req, res, next, "Group").insert());
9});