This commit is contained in:
9
examples/next-with-pages/src/pages/api/hello.ts
Normal file
9
examples/next-with-pages/src/pages/api/hello.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { NextApiRequest, NextApiResponse } from 'next';
|
||||
|
||||
type Data = {
|
||||
name: string;
|
||||
};
|
||||
|
||||
export default async function handler(req: NextApiRequest, res: NextApiResponse<Data>) {
|
||||
res.status(200).json({ name: 'John Doe' });
|
||||
}
|
||||
Reference in New Issue
Block a user