API -Anruf in Next.js

export default function handler(req, res) {
  res.status(200).json({ name: 'John Doe' })
}
Saikiran Puranam