diff --git a/pages/api/hello.ts b/pages/api/hello.ts deleted file mode 100644 index 941d4fa..0000000 --- a/pages/api/hello.ts +++ /dev/null @@ -1,13 +0,0 @@ -// 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" }); -} diff --git a/pages/api/ping.ts b/pages/api/ping.ts new file mode 100644 index 0000000..cfdba75 --- /dev/null +++ b/pages/api/ping.ts @@ -0,0 +1,7 @@ +// Next.js API route support: https://nextjs.org/docs/api-routes/introduction +import type { NextApiRequest, NextApiResponse } from "next"; + +export default function handler(_req: NextApiRequest, res: NextApiResponse) { + res.status(200).send("Pong!"); + res.end(); +}