summaryrefslogtreecommitdiffstats
path: root/pages/api
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-12-12 19:03:44 +0100
committerArmand Philippot <git@armandphilippot.com>2021-12-12 19:11:04 +0100
commitdf69949ebe244465b5baa7d1b91a2ed161b4827a (patch)
treebe291343bb8e5b58b6eb02bd9b9ea0302d64e7c7 /pages/api
chore: initial commit
Diffstat (limited to 'pages/api')
-rw-r--r--pages/api/hello.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/pages/api/hello.ts b/pages/api/hello.ts
new file mode 100644
index 0000000..f8bcc7e
--- /dev/null
+++ b/pages/api/hello.ts
@@ -0,0 +1,13 @@
+// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
+import type { NextApiRequest, NextApiResponse } from 'next'
+
+type Data = {
+ name: string
+}
+
+export default function handler(
+ req: NextApiRequest,
+ res: NextApiResponse<Data>
+) {
+ res.status(200).json({ name: 'John Doe' })
+}