Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/alosaur/mod.ts>serve

Alosaur - Deno web framework with many decorators
Go to Latest
function serve
Re-export
import { serve } from "https://deno.land/x/alosaur@v0.24.1/mod.ts";

Create a HTTP server

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

Parameters

addr: string | HTTPOptions