Is it possible to pass in methods instead of just objects in an Express route?
For example, after redirecting to a specific route, I want to execute an alert function.
app.get(res.redirect('/', function(req, res){
alert('this is an alert');
});
);
console.log - seems to be ok, but other methods are not.
I have tried:
res.redirect('/');
alert('this is an alert');
same thing error: ReferenceError: alert is not defined
As, answered below that Alert is a Client side function and not a server side function:
Is there a way that I can tell the server side to pass some client side function after redirecting?