MCPcopy Create free account
hub / github.com/vercel/examples / handler

Function handler

solutions/node-hello-world/api/hello.ts:3–8  ·  view source on GitHub ↗
(req: VercelRequest, res: VercelResponse)

Source from the content-addressed store, hash-verified

1import type { VercelRequest, VercelResponse } from '@vercel/node'
2
3export default function handler(req: VercelRequest, res: VercelResponse) {
4 const { name = 'World' } = req.query
5 return res.json({
6 message: `Hello ${name}!`,
7 })
8}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected