A curated set of rules and patterns for building production-ready Fastify applications. Each rule includes incorrect and correct examples with explanations.
The rules are organized by topic in the rules/ directory. Each rule follows a consistent format with impact rating, incorrect/correct examples, and references to official docs.
| Create Server | create-server.md | LOW-MEDIUM | Use a buildServer() factory function for reusable, testable server setup | | Create Plugin | create-plugin.md | LOW-MEDIUM | Encapsulate reusable functionality in plugins with fastify-plugin | | Autoload | autoload.md | HIGH | Automatically load plugins and routes from the filesystem with @fastify/autoload |
Appliquez les meilleures pratiques de Fastify lors de la création de serveurs, de plugins, d'itinéraires, de schémas, de hooks, de décorateurs, de gestion des erreurs, de tests et d'intégration de TypeScript. À utiliser lors de l'écriture ou de la révision du code Fastify, de la configuration d'un nouveau projet Fastify ou de la question « Comment dois-je structurer mon application Fastify ? » Source : thecodepace/fastify-skills.