express redirect from controller to view code example
Example 1: javascript redirect
window.location.href = "http://mywebsite.com/home.html";
Example 2: express redirect to url
app.get('/', (req, res) => {
res.redirect('/about');
})
window.location.href = "http://mywebsite.com/home.html";
app.get('/', (req, res) => {
res.redirect('/about');
})