# WServer provides support for Web Servers (via Rack) require 'rack' require 'rack/builder' require 'crystal/conveyor' # support [ 'rack/request', 'rack/response', 'rack/rack_adapter' ].each{|f| require "crystal/http/support/#{f}"} # http [ # 'config', 'http', 'http_adapter', 'processors/prepare_params', 'processors/http_writer', 'processors/http_logger', 'processors/evaluate_format' ].each{|f| require "crystal/http/#{f}"} module Crystal autoload :StaticFiles, 'crystal/http/middleware/static_files' end Crystal.metaclass_eval do delegate :build_common_app, :to => Crystal::RackAdapter delegate :call, :to => Crystal::HTTPAdapter delegate :ensure_public_symlink, :to => Crystal::HTTP end # # Initialization # Crystal::Config::DEFAULTS.merge!({ :host => '0.0.0.0', :port => 4000, :static => true, :url_root => '', :default_format => 'html', }.stringify_keys)