Container passed to every middleware/handler combining WayRequest and WayResponse. Most apps interact with bunWay exclusively through this object.
app.use(async (ctx, next) => { console.log(ctx.req.method, ctx.req.path); await next();}); Copy
app.use(async (ctx, next) => { console.log(ctx.req.method, ctx.req.path); await next();});
Instantiate a context for the given request and optional body parser conf.
Optional
Readonly
Container passed to every middleware/handler combining WayRequest and WayResponse. Most apps interact with bunWay exclusively through this object.