Express 5 · Routing

Read the query string

Read values such as ?page=2.

app.get("/search", (req, res) => {
  res.json({ q: req.query.q });
});

Official Express 5 documentation

More routing commands

All routing commands · Express 5 cheatsheet

Was this page helpful?