Run the app locally:
bun install
bun run devThen test the endpoints:
curl http://localhost:3000/api/health
curl -X POST http://localhost:3000/api/checkout
curl http://localhost:3000/api/errorThis example shows how to:
- Configure evlog with
createEvlog(enrichers, sampling, routes, drain pipeline) - Build wide events with
log.set(...)across handler stages - Return structured errors with
createError(why/fix/link) - Use
EvlogProviderfor client-side logging withlog,setIdentity,clearIdentity - Ingest client logs via
/api/evlog/ingest - Set up middleware with
evlogMiddlewareinproxy.ts