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

x/plugin_prepare/test_deps.ts>serve

A library for managing deno native plugin dependencies
Latest
function serve
import { serve } from "https://deno.land/x/plugin_prepare@v0.8.0/test_deps.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

Returns

Server