mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	Changed default mode to development
This commit is contained in:
		
							parent
							
								
									79ef2f30f7
								
							
						
					
					
						commit
						bde69e1cdb
					
				
					 4 changed files with 2 additions and 4 deletions
				
			
		|  | @ -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 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -33,5 +33,4 @@ class Kemal::Logger < HTTP::Handler | ||||||
| 
 | 
 | ||||||
|     "#{(millis * 1000).round(2)}µs" |     "#{(millis * 1000).round(2)}µs" | ||||||
|   end |   end | ||||||
| 
 |  | ||||||
| end | end | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue