res.redirect to url what user enterd in ui code example
Example 1: express redirect to url
app.get('/', (req, res) => {
res.redirect('/about');
})
Example 2: express js redirect to url
app.all('/secret', function (req, res, next) {
console.log('Accessing the secret section ...')
next() // pass control to the next handler
})