How to access the GET parameters after “?” in Express?
I know how to get the params for queries like this: app.get(‘/sample/:id’, routes.sample); In this case, I can use req.params.id to get the parameter (e.g. 2 in /sample/2). However, for url like /sample/2?color=red, how can I access the variable color? I tried req.params.color but it didn’t work. 10 s 10 So, after checking out the … Read more