Releases: wobsoriano/elysia-autoroutes
Releases · wobsoriano/elysia-autoroutes
v0.5.0
v0.4.0
- Set Elysia peer dependency to
^0.7.0
- Types fixes
v0.3.0
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('/', () => ({ ... }))