summaryrefslogtreecommitdiffstats
path: root/pages/api/hello.ts
diff options
context:
space:
mode:
Diffstat (limited to 'pages/api/hello.ts')
-rw-r--r--pages/api/hello.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/pages/api/hello.ts b/pages/api/hello.ts
new file mode 100644
index 0000000..87c740d
--- /dev/null
+++ b/pages/api/hello.ts
@@ -0,0 +1,8 @@
+// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
+
+import type { NextApiRequest, NextApiResponse } from 'next';
+
+// eslint-disable-next-line
+export default (req: NextApiRequest, res: NextApiResponse) => {
+ res.status(200).json({ name: 'John Doe' });
+};