The skeleton — Capstone: the shelter service · NestJS

Start the shelter service from almost nothing: settings from .env, a health check, and the cats API with every rule a client can break checked at the door: validated bodies, refused unknown properties, numeric ids, and 404s that say what was missing.

What you will learn

Read the theory for The skeleton

All Capstone: the shelter service lessons

All NestJS courses

loading types…

What you'll learn

  • Read a specification and turn it into modules, controllers, services and DTOs without a step-by-step guide
  • Load settings from .env with ConfigModule and read them with ConfigService
  • Validate every body globally, refuse properties a DTO does not declare, and derive an update DTO from a create DTO
  • Answer the API's errors as Nest does: 400 with the rules that failed, 404 naming what was not found, 204 for a deletion