Node.js and Express.js best practices for backend development
Add this skill
npx mdskills install PatrickJS/cursor-node-expressExtensive checklist of topics but lacks specific, actionable instructions for agents to execute
1---2description: Node.js and Express.js best practices for backend development3globs: **/*.js, **/*.ts, src/**/*.ts4---56# Node.js and Express.js Best Practices78## Project Structure9- Use proper directory structure10- Implement proper module organization11- Use proper middleware organization12- Keep routes organized by domain13- Implement proper error handling14- Use proper configuration management1516## Express Setup17- Use proper middleware setup18- Implement proper routing19- Use proper error handling20- Configure proper security middleware21- Implement proper validation22- Use proper static file serving2324## API Design25- Use proper REST principles26- Implement proper versioning27- Use proper request validation28- Handle errors properly29- Implement proper response formats30- Document APIs properly3132## Database Integration33- Use proper ORM/ODM34- Implement proper migrations35- Use proper connection pooling36- Implement proper transactions37- Use proper query optimization38- Handle database errors properly3940## Authentication41- Implement proper JWT handling42- Use proper password hashing43- Implement proper session management44- Use proper OAuth integration45- Implement proper role-based access46- Handle auth errors properly4748## Security49- Use proper CORS setup50- Implement proper rate limiting51- Use proper security headers52- Implement proper input validation53- Use proper encryption54- Handle security vulnerabilities5556## Performance57- Use proper caching58- Implement proper async operations59- Use proper connection pooling60- Implement proper logging61- Use proper monitoring62- Handle high traffic properly6364## Testing65- Write proper unit tests66- Implement proper integration tests67- Use proper test runners68- Implement proper mocking69- Test error scenarios70- Use proper test coverage7172## Deployment73- Use proper Docker setup74- Implement proper CI/CD75- Use proper environment variables76- Configure proper logging77- Implement proper monitoring78- Handle deployment errors7980## Best Practices81- Follow Node.js best practices82- Use proper async/await83- Implement proper error handling84- Use proper logging85- Handle process signals properly86- Document code properly
Full transparency — inspect the skill content before installing.