Categories
JavaScript Answers

How to redirect to URL with Node.js?

Spread the love

To redirect to URL with Node.js, we use the res.redirect method.

For instance, we write

res.redirect("your/404/path.html");

to call res.redirect with the path to redirect to with Express.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *