mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Add more documentation
This commit is contained in:
parent
a8ecbde222
commit
18efc4601f
6 changed files with 10 additions and 2 deletions
|
@ -2,6 +2,8 @@ require "./kemal/*"
|
|||
require "./kemal/middleware/*"
|
||||
|
||||
module Kemal
|
||||
|
||||
# The command to run a `Kemal` application.
|
||||
def self.run
|
||||
Kemal::CLI.new
|
||||
config = Kemal.config
|
||||
|
@ -11,6 +13,7 @@ module Kemal
|
|||
config.server = HTTP::Server.new(config.host_binding.not_nil!, config.port, config.handlers)
|
||||
config.server.not_nil!.ssl = config.ssl
|
||||
|
||||
# Test environment doesn't need to have signal trap, built-in images, and logging.
|
||||
unless config.env == "test"
|
||||
Signal::INT.trap {
|
||||
config.logger.write "Kemal is going to take a rest!\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue