SvelteKit server routes expose aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/elysiajs/documentation/llms.txt
Use this file to discover all available pages before exploring further.
request object that conforms to the Web Standard API, making Elysia a natural fit. You define your Elysia server in a catch-all route file and export a fallback function that delegates requests to app.handle.
Create the catch-all server route file
Create
src/routes/[...slugs]/+server.ts in your SvelteKit project.Route prefix
If you place your server route in a subdirectory (e.g.src/routes/api/[...slugs]/+server.ts), set the prefix option on your Elysia server to match:
pnpm peer dependencies
If you use pnpm, install peer dependencies manually:See SvelteKit Routing for further reference on SvelteKit server routes.