[SOLVED]How does Exercise Tracker url params work?

I’m doing the exercise tracker project and I don’t know how to implement this feature:
GET users’s exercise log: GET /api/exercise/log?{userId}[&from][&to][&limit]
Normally with express I could do:
app.get(’/api/exercise/:id’, function(req, res) {
User.find({_id: req.params.id}, function(err, result) {
//code goes here

But I don’t understand how log?{userId}[&from][&to][&limit] is implemented. Please explain what I’m supposed to do.

You can use the req.query property to extract values from a url that has a query string.



Thank you for your help.