summaryrefslogtreecommitdiffstats
path: root/src/pages/api/hello.ts
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-12-12 23:23:52 +0100
committerArmand Philippot <git@armandphilippot.com>2021-12-12 23:23:52 +0100
commit6c1cbe9f4d956ad6140c780b2f88f5de4e4eee67 (patch)
tree86ecc5b223a771d90dd977bc3917a8dacedb4128 /src/pages/api/hello.ts
parentf3d462c8183598362605dc53589583f2859f20b9 (diff)
build: move global styles and pages inside src directory
Diffstat (limited to 'src/pages/api/hello.ts')
-rw-r--r--src/pages/api/hello.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/pages/api/hello.ts b/src/pages/api/hello.ts
new file mode 100644
index 0000000..89e4d6b
--- /dev/null
+++ b/src/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' });
+}