This is a repository of companion code examples for the Golang Dorset lightning talk on HTTP middleware.
The repository is comprised of 4 parts:
- Part One - A simple HTTP server with an API whose
/hello
endpoint returns a friendly message. - Part Two - Extending the HTTP server with a middleware to secure
/hello
with an API key. - Part Three - Further extending the HTTP server with another middleware to add request logging.
- Part Four - Tidying up the middleware implementation by chaining.