Recipes
Recipes
Short, copy-paste solutions to common NextRush tasks.
Each recipe below solves one narrow, specific problem — a complete solution, a short explanation of the one non-obvious part, and a link to the concept it's built on. For task-oriented walkthroughs that build a whole feature end-to-end, see Guides instead.
Available Recipes
Paginate a List Endpoint
Turn query-string page/limit params into a bounded slice of a list.
JWT Authentication (Functional)
Verify a bearer JWT in plain middleware — no class runtime required.
Per-User Rate Limiting
Key the rate limiter by authenticated user instead of IP address.
CORS for a Multi-Tenant SaaS API
Allow every tenant subdomain plus a marketing domain, with credentials.
Postgres in a Service Layer
Wire a pooled Postgres client into a DI-managed service without an ORM.
Background Jobs / Deferred Work
Run work after the response without blocking the request.
Was this helpful?