A tiny, lightweight router built on the Web-standard Request and Response APIs.
Website · npm · Documentation
Features
Lightweight — Minimal footprint with just one dependency.
Web Standards — Built around native Request , Response , and Headers .
Middleware — Flexible middleware with next() support.
Sub-routers — Mount routers with path prefixes.
Request Context — Access request-scoped context from anywhere.
Cookies — Built-in cookie management and serialization.
Static Files — Serve static assets with caching support.
Framework Adapters — Integrate with Express, Fastify, Koa, Hono, and more.
Multi-runtime — Node.js, Bun, Deno, and Cloudflare Workers ( nodejs_compat ).
Installation
npm install xanout
Enter fullscreen mode
Exit fullscreen mode
Quick Start
import { Router } from "xanout" ;
const route = Router ( ) ;
// Middleware route . use ( ( next ) => { console . log ( "Request received" ) ; return next ( ) ; } ) ;
// Routes route .…