MDN has a good lesson on redirects, especially the Use Cases section.
let path = '/some/resource';
response.statusCode = 302;
response.setHeader('Location', path);
response.write('Redirecting to ' + path);
response.end();
response.redirect('/some/resource')