Node.js Best Practices
Principles and decision-making for Node.js development in 2025. Learn to THINK, not memorize code patterns.
⚠️ How to Use This Skill
This skill teaches decision-making principles, not fixed code to copy.
-
ASK user for preferences when unclear
-
Choose framework/pattern based on CONTEXT
-
Don't default to same solution every time
- Framework Selection (2025)
🧠 Knowledge Modules (Fractal Skills)
-
Decision Tree
-
Comparison Principles
-
Selection Questions to Ask:
-
Native TypeScript
-
Module System Decision
-
Runtime Selection
-
Layered Structure Concept
-
Why This Matters:
-
When to Simplify:
-
Centralized Error Handling
-
Error Response Philosophy
-
Status Code Selection
-
When to Use Each
-
Event Loop Awareness
-
Avoiding Event Loop Blocking
-
Validate at Boundaries
-
Validation Library Selection
-
Validation Philosophy
-
Security Checklist (Not Code)
-
Security Mindset
-
Test Strategy Selection
-
What to Test (Priorities)
-
Built-in Test Runner (Node.js 22+)
-
❌ DON'T:
-
✅ DO: