Skip to content

Bundled Middleware ​

Vox ships with a few middleware. Two of them are built into every application, and the others are optional packages in the same module.

MiddlewarePackagePurpose
loggingbuilt inPrints an access log line for each request.
respondbuilt inWrites the status, headers and body to the client.
Static Filesgithub.com/aisk/vox/middlewares/staticServes files from a local directory.
Pprofgithub.com/aisk/vox/middlewares/pprofExposes Go's runtime profiling endpoints.

The built-in middleware is described in the Middleware guide. To write your own, start with the same guide, and see Recipes for common examples.

Released under the MIT License.