Every route handler receives exactly one parameter: a context object. You should extend the context object with whatever data you find useful to preserve through the lifetime of a single request. The context exposes the following getters for data you're likely to find useful:
method
: the request methodheaders
: the request headersurl
: the parsed request urlquery
: the request query params, if anyparams
: the request url params, if anybody
: a promise that resolves to the request body contentstart
: timestamp in ms since the epoch of when the request started to be handledaccepts
: content-negotiation for the request, provided by acceptsrequest
: the raw node request objectredisClient
: a node-redis client; present if you have enabled the redis featurepostgresClient
: a node-postgres client; present if you have enabled the postgresql feature