mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
When using page routes we need to pass the contents of the `export const config` to the `extraConfig` populating the functions config manifest rather then relying on named exports like in app router.
11 lines
253 B
TypeScript
11 lines
253 B
TypeScript
import { NextApiResponse, NextApiRequest } from 'next'
|
|
|
|
export default function handler(
|
|
_req: NextApiRequest,
|
|
res: NextApiResponse<{ hello: string }>
|
|
) {
|
|
return res.status(200).json({ hello: 'world' })
|
|
}
|
|
|
|
export const config = { maxDuration: 1 }
|