Sha256: 1501881e677f9cfd1c2f7c586d2c07254a73c88fbd14e06c45427f68fe30ced8

Contents?: true

Size: 1.01 KB

Versions: 10

Compression:

Stored size: 1.01 KB

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::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']

require 'utopia/session'
use Utopia::Session,
	:expires_after => 3600 * 24,
	:secret => ENV['UTOPIA_SESSION_SECRET']

use Utopia::Controller

use Utopia::Static

# Serve dynamic content
use Utopia::Content

run lambda { |env| [404, {}, []] }

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
utopia-2.5.0 setup/site/config.ru
utopia-2.4.1 setup/site/config.ru
utopia-2.4.0 setup/site/config.ru
utopia-2.3.0 setup/site/config.ru
utopia-2.2.0 setup/site/config.ru
utopia-2.1.2 setup/site/config.ru
utopia-2.1.1 setup/site/config.ru
utopia-2.1.0 setup/site/config.ru
utopia-2.0.3 setup/site/config.ru
utopia-2.0.2 setup/site/config.ru