NestJS tips
2 tips · newest first
Focused NestJS tips on pipes, dependency injection, validation, and clean production setups — small snippets that fix real backend pain points.
Validate and convert date query params at the boundary with ParseDatePipe
NESTJSNestJS 11 ships ParseDatePipe, which validates an incoming date string and hands your handler a real Date. Parsing date…
nestjs11pipes
@hnoozConfigure a strict global ValidationPipe to strip unknown fields and coerce DTOs
NESTJSwhitelist: true removes any property not declared with a validation decorator — your defense against mass-assignment, s…
nestjsvalidation
@hnooz