diff --git a/pages/api/query/[path].ts b/pages/api/query/[path].ts new file mode 100644 index 0000000..40919e9 --- /dev/null +++ b/pages/api/query/[path].ts @@ -0,0 +1,3 @@ +import { Handler } from "express"; +export const handler: Handler = (req, res) => res.json(req.query); +export default handler; diff --git a/pages/query/[path].mdx b/pages/query/[path].mdx new file mode 100644 index 0000000..b75807c --- /dev/null +++ b/pages/query/[path].mdx @@ -0,0 +1,9 @@ +import { useRouter } from "next/router"; +export const Query = () => { + const { query } = useRouter(); + return
{JSON.stringify(query, null, " ")}; +}; + +# Query + +