Download next.js/test/e2e/edge-pages-support/app/pages/api/hello.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 229 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/edge-pages-support/app/pages/api/hello.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/edge-pages-support/app/pages/api/hello.js
-
curl -L -o hello.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/edge-pages-support/app/pages/api/hello.js
229 Bytes
| export const config = { | |
| runtime: 'edge', | |
| } | |
| export default async function handler(req) { | |
| return new Response( | |
| JSON.stringify({ | |
| hello: 'world', | |
| query: Object.fromEntries(req.nextUrl.searchParams), | |
| }) | |
| ) | |
| } | |