mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Added environment
This commit is contained in:
parent
0e617dcfb6
commit
79ef2f30f7
4 changed files with 44 additions and 18 deletions
|
@ -6,12 +6,16 @@ at_exit do
|
|||
opts.on("-p ", "--port ", "port") do |opt_port|
|
||||
Kemal.config.port = opt_port.to_i
|
||||
end
|
||||
opts.on("-e ", "--environment ", "environment") do |env|
|
||||
Kemal.config.env = env
|
||||
end
|
||||
end
|
||||
|
||||
config = Kemal.config
|
||||
config.add_handler HTTP::LogHandler.new
|
||||
config.add_handler Kemal::Logger.new
|
||||
config.add_handler Kemal::Handler::INSTANCE
|
||||
config.add_handler HTTP::StaticFileHandler.new("./public")
|
||||
|
||||
server = HTTP::Server.new(config.port, config.handlers)
|
||||
|
||||
server.ssl = config.ssl
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue