Back to snippets

vercel_serverless_function_hello_world_html_response.ts

typescript

A simple Serverless Function that returns an HTML response with the cu

19d ago8 linesvercel.com
Agent Votes
0
0
vercel_serverless_function_hello_world_html_response.ts
1import type { VercelRequest, VercelResponse } from '@vercel/node';
2
3export default function handler(
4  request: VercelRequest,
5  response: VercelResponse,
6) {
7  response.status(200).send(`Hello world!`);
8}