forked from rdfa/rdfa-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ru
29 lines (22 loc) · 773 Bytes
/
config.ru
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env rackup
$:.unshift(File.expand_path('../lib', __FILE__))
require 'rubygems' || Gem.clear_paths
require 'bundler'
Bundler.require(:default)
require 'rack/cache'
require 'crazyivan'
set :environment, (ENV['RACK_ENV'] || 'production').to_sym
if settings.environment == :production
puts "Mode set to #{settings.environment.inspect}, logging to sinatra.log"
log = File.new('sinatra.log', 'a')
STDOUT.reopen(log)
STDERR.reopen(log)
else
puts "Mode set to #{settings.environment.inspect}, logging to console"
end
use Rack::Cache,
:verbose => true,
:metastore => "file:" + File.expand_path("../cache/meta", __FILE__),
:entitystore => "file:" + File.expand_path("../cache/body", __FILE__)
disable :run, :reload
run CrazyIvan::Application