Breaking
-
Set Elysia peer dep to
^0.6.0
-
Route files should now export default a function that accepts
ElysiaApp
and returnsElysiaApp
, which gets passed togroup
.
Before:
import type { Context } from 'elysia'
export const get = (context: Context) => ({ ... })
export const post = (context: Context) => ({ ... })
export const del = (context: Context) => ({ ... })
After:
import type Elysia from 'elysia'
export default (app: Elysia) => app
.get('/', () => ({ ... }))
.post('/', () => ({ ... }))
.put('/', () => ({ ... }))
.patch('/', () => ({ ... }))
.delete('/', () => ({ ... }))