Skip to main content
Module

x/alosaur/src/deps.ts>serve

Alosaur - Deno web framework with many decorators
Very Popular
Go to Latest
function serve
import { serve } from "https://deno.land/x/alosaur@v0.15.0/src/deps.ts";

Create a HTTP server

import { serve } from "https://deno.land/std/http/server.ts";
const body = "Hello World\n";
const s = serve({ port: 8000 });
for await (const req of s) {
  req.respond({ body });
}

Parameters

addr: string | HTTPOptions