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 |
Wenden Sie die Best Practices von Fastify an, wenn Sie Server, Plugins, Routen, Schemata, Hooks, Dekoratoren, Fehlerbehandlung, Tests und TypeScript-Integration erstellen. Verwenden Sie diese Funktion, wenn Sie Fastify-Code schreiben oder überprüfen, ein neues Fastify-Projekt einrichten oder fragen: „Wie soll ich meine Fastify-App strukturieren?“ Quelle: thecodepace/fastify-skills.