1
I can do this more with a route, but I want to do something like:
app.redirect(url);
and not:
app.get('/', function(req, res) {
res.redirect(url);
});
someone can help me?
vlw , and obgd!
1
I can do this more with a route, but I want to do something like:
app.redirect(url);
and not:
app.get('/', function(req, res) {
res.redirect(url);
});
someone can help me?
vlw , and obgd!
Browser other questions tagged javascript node.js redirecting express url-forwarding
You are not signed in. Login or sign up in order to post.
But what’s wrong with using res.redirect() ?
– Rubens Barbosa
The problem is that I want to do this when it is not possible to connect to the database, then it is redirected to a page that says this to the user
– Henrique.Araujo
Solved that question?
– durtto
Do you want to redirect to all routes? It seems you want to use a middleware.
– bpinhosilva