mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	Check for KEMAL_ENV variable already in Config#initialize (#552)
This commit is contained in:
		
							parent
							
								
									15022c25b8
								
							
						
					
					
						commit
						740cb188a9
					
				
					 2 changed files with 10 additions and 17 deletions
				
			
		|  | @ -8,7 +8,6 @@ module Kemal | ||||||
|       @key_file = "" |       @key_file = "" | ||||||
|       @cert_file = "" |       @cert_file = "" | ||||||
|       @config = Kemal.config |       @config = Kemal.config | ||||||
|       read_env |  | ||||||
|       if args |       if args | ||||||
|         parse args |         parse args | ||||||
|       end |       end | ||||||
|  | @ -52,11 +51,5 @@ module Kemal | ||||||
|         end |         end | ||||||
|       {% end %} |       {% end %} | ||||||
|     end |     end | ||||||
| 
 |  | ||||||
|     private def read_env |  | ||||||
|       if kemal_env = ENV["KEMAL_ENV"]? |  | ||||||
|         @config.env = kemal_env |  | ||||||
|       end |  | ||||||
|     end |  | ||||||
|   end |   end | ||||||
| end | end | ||||||
|  |  | ||||||
|  | @ -29,7 +29,7 @@ module Kemal | ||||||
|     def initialize |     def initialize | ||||||
|       @host_binding = "0.0.0.0" |       @host_binding = "0.0.0.0" | ||||||
|       @port = 3000 |       @port = 3000 | ||||||
|       @env = "development" |       @env = ENV["KEMAL_ENV"]? || "development" | ||||||
|       @serve_static = {"dir_listing" => false, "gzip" => true} |       @serve_static = {"dir_listing" => false, "gzip" => true} | ||||||
|       @public_folder = "./public" |       @public_folder = "./public" | ||||||
|       @logging = true |       @logging = true | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue