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.2.0-alpha.7/mod.ts";

Serves HTTP requests with the given handler. (Routers and Endpoints are handlers.) You can specify an object with a port and hostname option, which is the address to listen on. The default is port 8000 on hostname "0.0.0.0". This is a re-export of the serve() function from https://deno.land/std/http/server.ts.

Parameters

handler: http.Handler
optional
init: ServeInit