Sha256: fb49cea2af98827e0e3fba625b3adde25de12ea2de4541f6ba2c634f2543adf2
Contents?: true
Size: 1.02 KB
Versions: 10
Compression:
Stored size: 1.02 KB
Contents
#!/usr/bin/env rackup # frozen_string_literal: true require_relative 'config/environment' self.freeze_app if UTOPIA.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 UTOPIA.testing? end # serve static files from public/ use Utopia::Static, root: 'public' use Utopia::Redirection::Rewrite, { '/' => '/welcome/index' } use Utopia::Redirection::DirectoryIndex use Utopia::Redirection::Errors, { 404 => '/errors/file-not-found' } require 'utopia/localization' use Utopia::Localization, default_locale: 'en', locales: ['en', 'de', 'ja', 'zh'] require 'utopia/session' use Utopia::Session, expires_after: 3600 * 24, secret: UTOPIA.secret_for(:session), secure: true use Utopia::Controller # serve static files from pages/ use Utopia::Static # Serve dynamic content use Utopia::Content run lambda { |env| [404, {}, []] }
Version data entries
10 entries across 10 versions & 1 rubygems