I have a question, maybe it sounds dumb, but i couldnt find any real solution yet. I'm playing around with express.js, I have a list of links in the client html that all link to a url which specified in the server app.get('/myURL', function(req, res){...})
, now the question is I want each link links to this URL, but the URL is unique for each link, so the links in the list dont share the same URL. Any idear?
You might want to have a route that takes a parameter, like this:
app.get('/myURL/:parameter', user.load, function(request, result){
// ...
})
That way, /myURL/something
and /myURL/something_else
will both go to that route. You can then see what parameter
they used with the variable request.params.parameter
See the expressjs documentation: http://expressjs.com/api.html#app.VERB