Refactor helpers into module namespaces

This commit is contained in:
Johannes Müller 2017-07-16 21:49:27 +02:00 committed by sdogruyol
parent aaa2109837
commit 1cd329b92f
11 changed files with 357 additions and 177 deletions

View file

@ -4,6 +4,7 @@ private def handle(request, fallthrough = true)
io = IO::Memory.new
response = HTTP::Server::Response.new(io)
context = HTTP::Server::Context.new(request, response)
context.app = Kemal.application
handler = Kemal::StaticFileHandler.new "#{__DIR__}/static", fallthrough
handler.call context
response.close