Changed default mode to development

This commit is contained in:
Sdogruyol 2015-11-17 21:43:05 +02:00
parent 79ef2f30f7
commit bde69e1cdb
4 changed files with 2 additions and 4 deletions

View File

@ -7,7 +7,7 @@ at_exit do
Kemal.config.port = opt_port.to_i Kemal.config.port = opt_port.to_i
end end
opts.on("-e ", "--environment ", "environment") do |env| opts.on("-e ", "--environment ", "environment") do |env|
Kemal.config.env = env env ? Kemal.config.env = env : "development"
end end
end end

View File

@ -1,5 +1,4 @@
module Kemal module Kemal
class Config class Config
INSTANCE = Config.new INSTANCE = Config.new
HANDLERS = [] of HTTP::Handler HANDLERS = [] of HTTP::Handler

View File

@ -17,7 +17,7 @@ class Kemal::Handler < HTTP::Handler
@routes << Route.new(method, path, &handler) @routes << Route.new(method, path, &handler)
end end
def process_request(request) def process_request(request)
@routes.each do |route| @routes.each do |route|
match = route.match?(request) match = route.match?(request)
if match if match

View File

@ -33,5 +33,4 @@ class Kemal::Logger < HTTP::Handler
"#{(millis * 1000).round(2)}µs" "#{(millis * 1000).round(2)}µs"
end end
end end