Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/levo/src/deps.ts>server.serve

Server side rendering with The Elm Architecture in Deno
Latest
function server.serve
import { server } from "https://deno.land/x/levo@v0.0.27/src/deps.ts";
const { serve } = server;

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