BMAD-METHOD/.claude/rules/web-app-optimization-cursor.../sveltekit-api-routes.mdc

8 lines
420 B
Plaintext

---
description: Defines best practices for API routes in SvelteKit, focusing on request handling, response formatting, and global middleware.
globs: src/routes/api/**/*.ts
---
- Create API routes in the src/routes/api/ directory.
- Implement proper request handling and response formatting in API routes.
- Use SvelteKit's hooks for global API middleware.
- Implement proper error handling for data fetching operations.