Redirect programmatically in ZEIT Now v2.0

I wanted to perform a redirect in my Node.js serveless function as I would do using Express with res.redirect. Since the Response object is of the class http.ServerResponse one can use the method writeHead to accomplish this as follows:

module.exports = (req, res) => {