How To Target Express Route Parameters
Just a quick reminder that in Express, grabbing information from the route URL is possible through this:
Given the URL:
https://myexample.com/base/targetInformation
In app.js, or whatever file routing is handled in, setting a :target with the correct pattern matching should allow you to get targetInformation
app.get("/base/:target", function(req, res) {
console.log(req.params.target); #prints "targetInformation"
});In the callback function, req contains params that includes :target, which you can call by using the same name, just without the colon, target.