feat: add bun-fullstack agent and update skills
This commit is contained in:
15
.agent/skills/tech-stack/elysiajs/examples/map-response.ts
Normal file
15
.agent/skills/tech-stack/elysiajs/examples/map-response.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Elysia } from 'elysia'
|
||||
|
||||
const prettyJson = new Elysia()
|
||||
.mapResponse(({ response }) => {
|
||||
if (response instanceof Object)
|
||||
return new Response(JSON.stringify(response, null, 4))
|
||||
})
|
||||
.as('scoped')
|
||||
|
||||
new Elysia()
|
||||
.use(prettyJson)
|
||||
.get('/', () => ({
|
||||
hello: 'world'
|
||||
}))
|
||||
.listen(3000)
|
||||
Reference in New Issue
Block a user