Files
2025-02-21 17:08:29 +07:00

19 lines
294 B
TypeScript

import { Elysia, t } from '../src'
new Elysia()
.post('/', ({ body }) => body, {
body: t.Object({
username: t.String(),
password: t.String(),
nested: t.Optional(
t.Object({
hi: t.String()
})
)
}),
error({ error }) {
console.log(error)
}
})
.listen(3000)