So I have some routes defined, they work fine. I have a text input for searching at the top, and set up the following listener:
$('#tags').keypress(function(e) {
if (e.keyCode == 13 && document.getElementById('tags').value != '') {
loadDrink(document.getElementById('tags').value);
}
});
I was refactoring stuff and came across a snag. I need that search to redirect to router.get('/find/:name', function (req,res){});
How do I do this?
Thanks!