import { NextApiRequest, NextApiResponse } from 'next' export default function handler(req: NextApiRequest, res: NextApiResponse) { res.status(200).json({ message: 'Hello, world!' }) }
Using Next.js with TypeScript