- Created structured documentation with /patterns/, /examples/, and /reference/ directories - Implemented automatic context loading rules in CLAUDE.md based on file extensions, directories, and keywords - Added technology-specific patterns for Docker, Python, Node.js, Vue.js, Bash, networking, databases, and VM management - Included complete working examples for common workflows and troubleshooting references - Designed for minimal context usage with precise loading triggers 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
32 lines
1007 B
Markdown
32 lines
1007 B
Markdown
# Node.js Patterns
|
|
|
|
## Project Setup
|
|
- Use package.json with proper scripts
|
|
- Implement environment-based configuration
|
|
- Use ES modules or consistent CommonJS
|
|
- Proper dependency management (dev vs prod)
|
|
|
|
## Application Architecture
|
|
- **Express.js patterns** for REST APIs
|
|
- **Middleware chains** for request processing
|
|
- **Event-driven architecture** for scalability
|
|
- **Microservices** with proper service boundaries
|
|
|
|
## Error Handling
|
|
- Centralized error handling middleware
|
|
- Proper async/await error catching
|
|
- Process-level error handling
|
|
- Graceful shutdown patterns
|
|
|
|
## Performance & Security
|
|
- Connection pooling for databases
|
|
- Rate limiting and input validation
|
|
- Environment variable management
|
|
- Dependency vulnerability scanning
|
|
|
|
## Related Documentation
|
|
- Examples: `/examples/nodejs/express-api.md`
|
|
- Examples: `/examples/nodejs/microservices.md`
|
|
- Examples: `/examples/nodejs/package-management.md`
|
|
- Reference: `/reference/nodejs/debugging.md`
|
|
- Reference: `/reference/nodejs/security.md` |