Recipes
Recipes
Short, task-shaped walkthroughs that combine the essentials into working code.
Each recipe solves one task end to end and links back to the concept it uses. They assume a project created with the CLI or configured through existing project.
Validate a resource
One validation model per feature, used in both routes and handlers.
Testing
Assert routes in process with bun:test, without opening a port.
Custom logger
Replace the console logger with your own implementation.
Add CORS
Mount an Elysia plugin through a module.
Configure a plugin with DI
Build a plugin from injected configuration.
Standalone container
Use the module graph and container without HTTP.