Skip to content

Commit

Permalink
build: export runtime for api routes
Browse files Browse the repository at this point in the history
  • Loading branch information
bluenex committed May 11, 2024
1 parent 0b76f33 commit 3b7d8c3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pages/api/hello.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import type { NextApiRequest, NextApiResponse } from 'next'
import type { NextApiRequest, NextApiResponse } from "next";

type Data = {
name: string
}
name: string;
};

export default function handler(
req: NextApiRequest,
res: NextApiResponse<Data>
res: NextApiResponse<Data>,
) {
res.status(200).json({ name: 'John Doe' })
res.status(200).json({ name: "John Doe" });
}

export const runtime = "edge";

0 comments on commit 3b7d8c3

Please sign in to comment.