Add the following code to your project's shard.yml under:
to use in production
- OR -
development_dependencies to use in development
A generalized version of (and heavily inspired by) the HTTP::Sever::Handler. With some additional work, it could even replace the heavylifting of the HTTP::Server::Handler. I know the specs aren't exactly specs, but
$ crystal spec runs the "example" to make sure everything works fine.