Sha256: a8f062b45b4fe9918540813add7108795288dfd88f675690a52e6f804417f92a

Contents?: true

Size: 656 Bytes

Versions: 8

Compression:

Stored size: 656 Bytes

Contents

#!/usr/bin/env rackup
# frozen_string_literal: true

require 'utopia'
require 'json'

self.freeze_app

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

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

8 entries across 8 versions & 1 rubygems

Version Path
utopia-2.15.1 spec/utopia/performance_spec/config.ru
utopia-2.15.0 spec/utopia/performance_spec/config.ru
utopia-2.14.0 spec/utopia/performance_spec/config.ru
utopia-2.13.4 spec/utopia/performance_spec/config.ru
utopia-2.13.3 spec/utopia/performance_spec/config.ru
utopia-2.13.2 spec/utopia/performance_spec/config.ru
utopia-2.13.1 spec/utopia/performance_spec/config.ru
utopia-2.13.0 spec/utopia/performance_spec/config.ru