ExpressAPI is a small, simple, and type-safe web framework for Deno, built on Web Standards. Clean abstractions, elegant APIs, and almost no dependencies.
Typed end to end, not only on the server.
import { HttpServer } from "jsr:@webtools/expressapi";
export const server = new HttpServer()
.get("/", (_req, res) => res.json({ message: "Hello!" }))
.get("/users/:id", (req, res) => res.json({ id: req.params.id }));
export type AppRouter = typeof server;
server.listen(5050);import type { AppRouter } from "./server.ts";
import { HttpClient } from "jsr:@webtools/expressapi";
const client = new HttpClient<AppRouter>({ baseUrl: "http://localhost:5050" });
const user = await client.get("/users/:id", { params: { id: "42" } });
// ^ { id: string }deno add jsr:@webtools/expressapi- End-to-end types - Export
typeof server, get a fully typedHttpClient. No codegen, no contract file. - Clean abstractions -
HttpServer,Router,Middleware,HttpClient. Each has one job. - Elegant APIs - Express-shaped, chainable, and familiar. Params inferred from the URL string.
- Typed middleware - Context accumulates in
req.data. Wrong order fails at compile time. - Built-in validation - Schemas narrow
body,query, andparamswith no extra package. - Few dependencies - Small surface, easy to audit, built on native Deno Web APIs.
The documentation is available on expressapi-showcase.8borane8.deno.net.
Distributed under the MIT License. See LICENCE for more information.