Sha256: 6c0f04143c8ac3abcb8076c34d7bf30dff8cf3c230468644e1665fdf2c2609cb

Contents?: true

Size: 665 Bytes

Versions: 2

Compression:

Stored size: 665 Bytes

Contents

#!/usr/bin/env rackup

require 'utopia'
require 'json'

require 'rack/freeze'

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'],
# 	:ignore => ['/_static/', '/_cache/']

use Utopia::Controller,
	root: File.expand_path('pages', __dir__)

use Utopia::Static,
	root: File.expand_path('pages', __dir__)

# Serve dynamic content
use Utopia::Content,
	root: File.expand_path('pages', __dir__)

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
utopia-2.0.1 spec/utopia/performance_spec/config.ru
utopia-2.0.0 spec/utopia/performance_spec/config.ru