From ac31a7d9d43d3dcaa37906569dcb8eaf8429b3bf Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Tue, 29 Jun 2021 21:11:25 +0300 Subject: Initial commit --- pages/api/hello.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pages/api/hello.ts (limited to 'pages/api') 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 +) { + res.status(200).json({ name: 'John Doe' }) +} -- cgit v1.3