class Sabo::Tabby::Config

Overview

Stores all the configuration options for a Sabo::Tabby application.

It's a singleton and you can access it like:

Sabo::Tabby.config

Defined in:

sabo-tabby/config.cr

Constant Summary

INSTANCE = Config.new

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def dir_index : Bool #

Whether to redirect / to /index.html.


[View source]
def dir_index=(dir_index : Bool) #

Whether to redirect / to /index.html.


[View source]
def dir_listing : Bool #

Whether to list directory files.


[View source]
def dir_listing=(dir_listing : Bool) #

Whether to list directory files.


[View source]
def emoji : Bool #

[View source]
def emoji=(emoji : Bool) #

[View source]
def error_page : Bool #

Whether to show an HTML error page or a basic text/plain one.


[View source]
def error_page=(error_page : Bool) #

Whether to show an HTML error page or a basic text/plain one.


[View source]
def gzip : Bool #

[View source]
def gzip=(gzip : Bool) #

[View source]
def handlers : Array(HTTP::Handler) #

[View source]
def host_binding : String #

[View source]
def host_binding=(host_binding : String) #

[View source]
def logger : Sabo::Tabby::LogHandler #

[View source]
def logger_style : LoggerStyle #

[View source]
def logger_style=(logger_style : LoggerStyle) #

[View source]
def logging : Bool #

[View source]
def logging=(logging : Bool) #

[View source]
def port : Int32 #

[View source]
def port=(port : Int32) #

[View source]
def public_folder : String #

[View source]
def public_folder=(public_folder : String) #

[View source]
def running : Bool #

[View source]
def running=(running : Bool) #

[View source]
def scheme : String #

[View source]
def serve_hidden : Bool #

Whether to server hidden files and folders.


[View source]
def serve_hidden=(serve_hidden : Bool) #

Whether to server hidden files and folders.


[View source]
def server : HTTP::Server | Nil #

[View source]
def server=(server : HTTP::Server | Nil) #

[View source]
def server_header : Bool #

[View source]
def server_header=(server_header : Bool) #

[View source]
def setup #

[View source]
def ssl : OpenSSL::SSL::Context::Server | Nil #

def ssl=(ssl : OpenSSL::SSL::Context::Server | Nil) #

def theme : Hash(String, ErrorPageTheme | DirectoryListingTheme | Crustache::Syntax::Template) #

Hash of themes.


[View source]