# backend-skill > Generate API routes, handle HTTP requests/responses, and connect to databases efficiently. Use for building backend services. - Author: MehmaRashid123 - Repository: MehmaRashid123/Hackathon-II_phase-II - Version: 20260208191303 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-08 - Source: https://github.com/MehmaRashid123/Hackathon-II_phase-II - Web: https://mule.run/skillshub/@@MehmaRashid123/Hackathon-II_phase-II~backend-skill:20260208191303 --- --- name: backend-skill description: Generate API routes, handle HTTP requests/responses, and connect to databases efficiently. Use for building backend services. --- # Backend Skill – Routes, Requests/Responses, DB Connection ## Instructions 1. **Route Generation** - Define endpoints for CRUD operations - Use RESTful or GraphQL conventions - Organize routes logically by resource 2. **Request Handling** - Parse incoming requests (body, query, params) - Validate input data - Handle authentication/authorization 3. **Response Management** - Return proper HTTP status codes - Send JSON responses - Handle errors gracefully 4. **Database Connection** - Connect to relational or NoSQL databases - Perform queries using ORM or raw SQL - Ensure secure credentials handling ## Best Practices - Keep endpoints RESTful and consistent - Validate and sanitize all inputs - Handle errors and edge cases properly - Maintain separation of concerns (routes, controllers, services) - Close DB connections properly to avoid leaks