Files
2025-02-27 00:04:07 +05:30

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.