api-development
Use when creating or modifying Elysia API routes. Ensures proper validation with t schema, auth guards, error handling, and performance patterns.
Installation
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
Voir la source ↗GuidesInstructions
See API patterns for full reference.
Quick example:
import { Elysia, t } from 'elysia'
import { prisma } from '@/lib/prisma'
new Elysia()
.get('/tasks/:id', async ({ params, status }) => {
const task = await prisma.task.findUnique({
where: { id: params.id },
select: { id: true, title: true }
})
if (!task) return status(404, { error: 'Not found' })
return task
}, {
params: t.Object({ id: t.String() })
})
Checklist: t.Object validation, auth guards, selective Prisma fields, pagination, proper status codes.
Exemples
Consultez les exemples du dépôt source.
Voir la source ↗Historique source
- Date d’indexation
- 2026-01-20
- Mise à jour de l’index
- 2026-03-03
- Branch
- main
Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!