Sha256: 802ad56e7903f7b2b265abef96fba159c54fc9a8d397778bcf137ec06f21e159
Contents?: true
Size: 1.21 KB
Versions: 18
Compression:
Stored size: 1.21 KB
Contents
#!/usr/bin/env rackup require_relative 'config/environment' if RACK_ENV == :production # Handle exceptions in production with a error page and send an email notification: use Utopia::Exceptions::Handler use Utopia::Exceptions::Mailer else # We want to propate exceptions up when running tests: use Rack::ShowExceptions unless RACK_ENV == :test # Serve the public directory in a similar way to the web server: use Utopia::Static, root: 'public' end use Rack::Sendfile use Utopia::ContentLength use Utopia::Redirection::Rewrite, '/' => '/welcome/index' use Utopia::Redirection::DirectoryIndex use Utopia::Redirection::Errors, 404 => '/errors/file-not-found' use Utopia::Localization, :default_locale => 'en', :locales => ['en', 'de', 'ja', 'zh'], :nonlocalized => ['/_static/', '/_cache/'] use Utopia::Controller, cache_controllers: (RACK_ENV == :production), base: Utopia::Controller::Base use Utopia::Static # Serve dynamic content use Utopia::Content, cache_templates: (RACK_ENV == :production), tags: { 'deferred' => Utopia::Tags::Deferred, 'override' => Utopia::Tags::Override, 'node' => Utopia::Tags::Node, 'environment' => Utopia::Tags::Environment.for(RACK_ENV) } run lambda { |env| [404, {}, []] }
Version data entries
18 entries across 15 versions & 1 rubygems