Get Started
Servest is a suite of HTTP/1.1 modules. There are three major API for handling HTTP stuffs.
If you want to build HTTP server anyway, App API is the best choice. Router API provides a high-level interfaces for building general purpose HTTP server (site, application, api or file server ...etc).
import { createApp } from "https://deno.land/x/[email protected]/mod.ts";
const app = createApp();
app.handle("/", async (req) => {
await req.respond({
status: 200,
headers: new Headers({
"content-type": "text/plain",
}),
body: "Hello, Servest!",
});
});
app.listen({ port: 8899 });
Advanced API
If you are familiar with HTTP/1.1 protocol and programing TCP server, Server API and Agent API may be useful for building customized HTTP libraries.