Sha256: 4865339a6cd7835183fdecd623db93775786dd1c0598ec8e44ec3d872cde8900

Contents?: true

Size: 882 Bytes

Versions: 11

Compression:

Stored size: 882 Bytes

Contents

#!/usr/bin/env rackup

require 'utopia'
require 'json'

# use Rack::ContentLength
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'],
# 	:nonlocalized => ['/_static/', '/_cache/']

use Utopia::Controller,
	root: File.expand_path('pages', __dir__),
	base: Utopia::Controller::Base,
	cache_controllers: true

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

# Serve dynamic content
use Utopia::Content,
	root: File.expand_path('pages', __dir__),
	cache_templates: true,
	tags: {
		'deferred' => Utopia::Tags::Deferred,
		'override' => Utopia::Tags::Override,
		'node' => Utopia::Tags::Node,
	}

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
utopia-1.9.11 spec/utopia/performance_spec/config.ru
utopia-1.9.10 spec/utopia/performance_spec/config.ru
utopia-1.9.9 spec/utopia/performance_spec/config.ru
utopia-1.9.7 spec/utopia/performance_spec/config.ru
utopia-1.9.6 spec/utopia/performance_spec/config.ru
utopia-1.9.5 spec/utopia/performance_spec/config.ru
utopia-1.9.4 spec/utopia/performance_spec/config.ru
utopia-1.9.3 spec/utopia/performance_spec/config.ru
utopia-1.9.2 spec/utopia/performance_spec/config.ru
utopia-1.9.1 spec/utopia/performance_spec/config.ru
utopia-1.9.0 spec/utopia/performance_spec/config.ru