Answers for "express redirect request to another endpoint"

4

express redirect to url

app.get("/where", (req, res) => {
   res.status(301).redirect("https://www.google.com")
}) //You need to include the status (301)
Posted by: Guest on October-19-2021
1

express redirect to url

app.get('/', (req, res) => {
  res.redirect('/about');
})
Posted by: Guest on October-27-2020

Code answers related to "express redirect request to another endpoint"

Code answers related to "Javascript"

Browse Popular Code Answers by Language