This may be stupadly easy, or just impossible – but it’s worth asking in my opinion.
The reason is because I was trying to demo a quick and dirty (lol) url-shortening app.
app.get('/link/:key', function(req, res){
client.get(req.params.key, function(err, reply){
if(client.get(reply)){
// route to reply here
}
else{
res.render('index', {
link: null
});
}
});
});
How would I perform that route, if possible?
http://expressjs.com/guide.html: