class Azu::Configuration

Overview

Holds all the configuration properties for your Azu Application

Azu expects configurations to be loaded from environment variables for local development it is recommended to use .env files to store your development configuration properties.

Azu.configure do |c|
  c.port = 4000
  c.host = localhost
  c.port_reuse = true
  c.log = Log.for("My Awesome App")
  c.env = Environment::Development
  c.template_hot_reload = true
  c.template.path = "./templates"
  c.template.error_path = "./error_template"
  c.upload.max_file_size = 10.megabytes
  c.upload.temp_dir = "/tmp/uploads"
  c.cache.enabled = true
  c.cache.store = "memory"
  c.cache.max_size = 1000
end

Defined in:

azu/configuration.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Class Method Detail

def self.hot_reload_default #

[View source]

Instance Method Detail

def cache : Cache::Manager #

Cache configuration and manager


[View source]
def cache_config : Cache::Configuration #

Separate cache configuration object for advanced customization


[View source]
def development_tools #

Development tools access


[View source]
def env : Environment #

[View source]
def env=(env : Environment) #

[View source]
def finalize #

[View source]
def host : String #

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

[View source]
def log : Log #

[View source]
def log=(log : Log) #

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

Performance monitoring configuration - defaults to false for truly optional behavior


[View source]
def performance_enabled? : Bool #

Performance monitoring configuration - defaults to false for truly optional behavior


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

[View source]
def performance_memory_monitoring? : Bool #

[View source]
def performance_monitor : Nil #

[View source]
def performance_monitor=(monitor) #

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

[View source]
def performance_profiling_enabled? : Bool #

[View source]
def port : Int32 #

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

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

[View source]
def port_reuse? : Bool #

[View source]
def router : Router #

[View source]
def ssl_ca : String #

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

[View source]
def ssl_cert : String #

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

[View source]
def ssl_key : String #

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

[View source]
def ssl_mode : String #

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

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

[View source]
def template_hot_reload? : Bool #

[View source]
def templates : Templates #

[View source]
def tls #

[View source]
def tls? #

[View source]
def upload : UploadConfiguration #

[View source]