-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ru
40 lines (36 loc) · 1021 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
30
31
32
33
34
35
36
37
38
39
40
# # Rack is the interface between the web server and our app
# # it will forward incoming requests from the server to our app,
# # (starting the app) and send responses from our app back to
# # the web server to be...
# # served.
#
# # Define environment variables ( __FILE__ = config.ru )
# root_dir = File.dirname(__FILE__)
# app_file = File.join(root_dir, 'app.rb')
# set :environment, ENV['RACK_ENV'].to_sym
# set :root, root_dir.to_sym
#
# # Require our application (app.rb)
# require app_file
#
# # Some middleware configurations
# set :clean_trace, true
#
# # Haml should compile to html5
# Haml::Template.options[:format] = :html5
# set :haml, { :ugly=>true }
#
# # Sass should compile without spaces (reduces file size)
# use Sass::Plugin::Rack
# set :sass, {:style => :compressed}
#
# # run app.rb
# run app_file
# Requires
require 'rubygems'
require 'bundler/setup'
Bundler.require(:default)
require File.dirname(__FILE__) + '/app.rb'
map '/' do
run Web
end