What problem does it solve?
Provides a unified server-side runtime that centralizes request handling, response helpers, cookie management, and encrypted session management so developers can implement robust server logic without wiring these concerns manually.
Core Features & Use Cases
- Three-phase request handling: dispatches server functions, handles server routes, then falls back to app SSR for full request coverage.
- Request and response utilities: access request object, headers, IP, URL, and set response status, headers, and cookies from anywhere during a request.
- Cookie and session management: encrypted cookie-based sessions with utilities to use, update, and clear session data.
- AsyncLocalStorage context: makes request-scoped utilities available anywhere in the call stack during processing.
- Use Case: Build a server entry point that routes API calls to server functions, applies middleware, sets authentication cookies, and renders SSR pages with dehydrated state.
Quick Start
Use start-server-core to create a start handler that processes incoming requests, manages cookies and encrypted sessions, and exposes request utilities via AsyncLocalStorage.