class Kemal::Config

Overview

Kemal::Config stores all the configuration options for a Kemal application. It's a singleton and you can access it like.

Kemal.config

Defined in:

Constant Summary

ERROR_HANDLERS = {} of Int32 => (HTTP::Server::Context, Exception -> String)
HANDLERS = [] of HTTP::Handler
INSTANCE = Config.new

Class Method Summary

Instance Method Summary

Class Method Detail

def self.new #

Instance Method Detail

def add_error_handler(status_code, &handler : HTTP::Server::Context, Exception -> _) #

def add_filter_handler(handler : HTTP::Handler) #

def add_handler(handler : HTTP::Handler | HTTP::WebSocketHandler) #

def always_rescue : Bool #

def always_rescue=(always_rescue) #

def clear #

def env : String #

def env=(env) #

def error_handlers #

def extra_options(&extra_options : OptionParser -> ) #

def extra_options : OptionParser -> Nil? #

def extra_options=(extra_options) #

def handlers #

def host_binding : String #

def host_binding=(host_binding) #

def logger #

def logger=(logger : Kemal::BaseLogHandler) #

def logging : Bool #

def logging=(logging) #

def port : Int32 #

def port=(port) #

def public_folder : String #

def public_folder=(public_folder) #

def running : Bool #

def running=(running) #

def scheme #

def serve_static : Bool | Hash(String, Bool) #

def serve_static=(serve_static : Bool | Hash(String, Bool)) #

def server : HTTP::Server #

def server=(server) #

def setup #

def shutdown_message : Bool #

def shutdown_message=(shutdown_message) #

def ssl : OpenSSL::SSL::Context::Server? #

def ssl=(ssl) #