Retour aux cas pratiques
NestJSFondamental

Création d'un contrôleur NestJS minimal avec route GET fonctionnelle

Scénario

Contexte : Vous démarrez une nouvelle API backend avec NestJS pour un projet interne. Le Problème : Aucun endpoint n'est encore exposé et l'équipe a besoin d'une route simple pour valider l'infrastructure. Contraintes : Utiliser la CLI NestJS standard. Créer un module et un controller sans dépendances externes. Livrable attendu : Implémenter un controller avec une route GET /health retournant un JSON { "status": "ok" } avec code HTTP 200.

Compétences ciblées

nestjscontrollerapibackend
    Création d'un contrôleur NestJS minimal avec route GET fonctionnelle — mise en situation NestJS | CodeDuel