Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 2.36 KB

File metadata and controls

39 lines (32 loc) · 2.36 KB

Documentation

This is the technical documentation for @panmdaa/server, a zero-dependency TypeScript HTTP/WebSocket server library.

Every document here explains what a subsystem does, why it was designed that way, how it works internally, and when each code path runs.

Reading order

Using the library → start in Usage. Understanding the library → start with the architecture overview. Each document links to the relevant source files with file:line references.

Topic Document
Using the library, guides, best practices Usage
Big picture, module map, design philosophy Architecture overview
Why the code looks the way it does Design decisions
Routing engine (RadixTree, params, wildcards) Router
Route precedence and matching order Router matching & precedence
HTTP request lifecycle HTTP lifecycle
Middleware compilation (compileHandler) Handler compilation
Handler contexts (request surface) Context
Response surface Response
Body parsing Body
Error handling Errors
WebSocket handshake & upgrade WebSocket lifecycle
Frame parsing & unmasking Frames
Connection state machine Connection
permessage-deflate compression Compression
Heartbeat Heartbeat
HTTP/2 (streams & extended CONNECT) HTTP/2
Built-in middleware Middleware
Testing Testing
Benchmarks Benchmarking
npm scripts and tooling Development

Conventions used in this documentation

  • file:line references point at the current src/ layout.
  • "Fast path" means the code that runs for the common case (no query string, static route, small payload, no compression).
  • Performance claims that come from measured benchmarks are tagged [bench] and cross-referenced in Benchmarking.