Sha256: c60be0458d75c650d60a0c1dc0bb72e9558b9ca1dc9b76449ab1e64ee7dba51f
Contents?: true
Size: 1.35 KB
Versions: 3
Compression:
Stored size: 1.35 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/', '/_components/'] require 'utopia/session' use Utopia::Session, :expires_after => 3600 * 24, :secret => ENV['UTOPIA_SESSION_SECRET'] 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
utopia-1.9.11 | setup/site/config.ru |
utopia-1.9.10 | setup/site/config.ru |
utopia-1.9.9 | setup/site/config.ru |