1res.redirect('/foo/bar')
2res.redirect('http://example.com')
3res.redirect(301, 'http://example.com')
4res.redirect('../login')
5
1// send the rendered view to the client
2res.render('index')
3
4// if a callback is specified, the rendered HTML string has to be sent explicitly
5res.render('index', function (err, html) {
6 res.send(html)
7})
8
9// pass a local variable to the view
10res.render('user', { name: 'Tobi' }, function (err, html) {
11 // ...
12})
13