aboutsummaryrefslogtreecommitdiff
path: root/examples/hello-next/pages/api/hello.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hello-next/pages/api/hello.tsx')
-rw-r--r--examples/hello-next/pages/api/hello.tsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/hello-next/pages/api/hello.tsx b/examples/hello-next/pages/api/hello.tsx
new file mode 100644
index 000000000..df63de88f
--- /dev/null
+++ b/examples/hello-next/pages/api/hello.tsx
@@ -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' })
+}