Essential features for building production-ready APIs.
- OpenAPI / Swagger - Auto-generated documentation
- Rate Limiting - Request throttling
- CORS - Cross-origin resource sharing
- Response Caching - Cache headers & strategies
- Health Checks - Monitoring endpoints
App.UseSwagger;
App.UseSwaggerUI;
// Visit: /swaggerApp.UseRateLimiting(
TRateLimitOptions.Create
.Limit(100)
.PerMinute
);App.UseCors(
TCorsOptions.Create
.AllowOrigin('https://myapp.com')
.AllowMethods(['GET', 'POST'])
);App.MapGet('/health', procedure(Ctx: IHttpContext)
begin
Ctx.Response.Json('{"status": "healthy"}');
end);