Sha256: 891277cd50152c7a9faf68140466bd46f6029f62f5fc4897210cec0dbf14469e
Contents?: true
Size: 883 Bytes
Versions: 25
Compression:
Stored size: 883 Bytes
Contents
#!/usr/bin/env rackup require_relative 'config/environment' require 'rack/freeze' 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::Redirection::Rewrite, '/' => '/wiki/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'] use Utopia::Controller use Utopia::Static # Serve dynamic content use Utopia::Content run lambda { |env| [404, {}, []] }
Version data entries
25 entries across 25 versions & 1 rubygems