Answers for "next api typescript"

0

next api typescript

import type { NextApiRequest, NextApiResponse } from 'next'

type Data = {
  name: string
}

export default (req: NextApiRequest, res: NextApiResponse<Data>) => {
  res.status(200).json({ name: 'John Doe' })
}
Posted by: Guest on March-21-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language