Express Get Current Requested Url
If you want to get the full requested URL in your Express application:
var requestedUrl = req.protocol + '://' + req.get('Host') + req.originalUrl;
If you want to make it available on your views you can use a middleware function to add context to the response's local context:
app.use(function(req, res, next){
if(!res.locals) res.locals = {};
var requestedUrl = req.protocol + '://' + req.get('Host') + req.originalUrl;
res.requestedUrl = requestedUrl;
next();
});