diff options
Diffstat (limited to 'demos/hello-next/pages/api/hello.js')
-rw-r--r-- | demos/hello-next/pages/api/hello.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/demos/hello-next/pages/api/hello.js b/demos/hello-next/pages/api/hello.js new file mode 100644 index 000000000..df63de88f --- /dev/null +++ b/demos/hello-next/pages/api/hello.js @@ -0,0 +1,5 @@ +// Next.js API route support: https://nextjs.org/docs/api-routes/introduction + +export default function handler(req, res) { + res.status(200).json({ name: 'John Doe' }) +} |