What is the type of issue?
No response
What is the issue?
In the documentation https://elysiajs.com/essential/life-cycle#order-of-code, there is an example:
import { Elysia } from 'elysia'
new Elysia()
.onBeforeHandle(() => {
console.log('1')
})
.get('/', () => 'hi')
.onBeforeHandle(() => {
console.log('2')
})
.listen(3000)
Console should log the following:
Notice that it doesn't log 2, because the event is registered after the route so it is not applied to the route.
But when I execute this code, it outputs 1
and 2
. Am I missing something?
Where did you find it?
https://elysiajs.com/essential/life-cycle#order-of-code & https://elysiajs.com/key-concept.html#order-of-code