aboutsummaryrefslogtreecommitdiff
path: root/demos/hello-next/pages/api
diff options
context:
space:
mode:
Diffstat (limited to 'demos/hello-next/pages/api')
-rw-r--r--demos/hello-next/pages/api/hello.js5
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' })
+}