This plugin add support for streaming response or sending Server Sent Event back to client.
Install with:
Then use it:
Server Timing then will append header 'Server-Timing' with log duration, function name and detail for each life-cycle function.
To inspect, open browser developer tools > Network > [Request made through Elysia server] > Timing.
Then inspect the Server Timing of your server
Below is a config which is accepted by the plugin
@default NODE_ENV !== 'production'
Determine whether or not Server Timing should be enabled
@default undefined
A condition whether server timing should be log
@default undefined
Allow Server Timing to log specified life-cycle events:
Trace accepts object of the following:
Below you can find the common patterns to use the plugin.
You may disabled Server Timing on specific route via allow
property