Skip to main content
Module

x/cav/mod.ts>serve

A server framework for Deno
Go to Latest
function serve
import { serve } from "https://deno.land/x/cav@0.0.8/mod.ts";

Shorthand function for quickly serving a Handler. This function is a one-liner:

return await server({ ...init, handler }).listenAndServe();

Parameters

handler: http.Handler
optional
init: Omit<ServerInit<http.Handler>, "handler">

Returns

Promise<void>