1,res.location()
2. res.redirect()
location()与redirect()的比较:
Express的response对象,是对Node.js原生对象ServerResponse的扩展。location()方法只会设置Location头,而redirect()方法除了会设置Location头外还可自动或手头设置HTTP状态码。理论上讲两者可以实现重定向。
https://itbilu.com/nodejs/npm/EJD5cyg3l.html#redirect