I\'m using Node.js and I want to see all of the parameters that have been posted to my script. To get to my function, in my routes/index.js
I\'m doing:
I had a similar problem and thought I'd post the solution to that for those coming here for the same reason. My req.params was coming out as an empty object because I declared the URL variable in the parent route. The solution is to add this option to the router:
const router = express.Router({ mergeParams: true });