-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBrockman.rb
44 lines (31 loc) · 1002 Bytes
/
Brockman.rb
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
41
# encoding: utf-8
###
# ___ _
# | _ ) _ _ ___ __ | |__ _ ___ __ _ _ __
# | _ \ | '_| / _ \ / _| | / / | ' | / _` | | ' |
# |___/ |_| \___/ \__| |_\_\ |_|_|_| \__,_| |_||_|
#
# Reporting for Tangerine, I'm Brockman.
###
require "bundler"
Bundler.require
require_relative 'utilities/output'
require_relative 'settings.rb'
require_relative 'routes/init'
$logger = Logger.new "Brockman.log"
class Brockman < Sinatra::Base
helpers Sinatra::Cookies
set :allow_origin => :any,
:allow_methods => [:get, :post, :options],
:allow_credentials => true,
:max_age => "1728000",
:protection => { :except => :json_csrf },
:port => 4447,
:cookie_options => {:domain => "ntp.tangerinecentral.org"},
:env => :production,
:public_folder => './public'
get "/" do
output "csv", false
end
run! if __FILE__ == $0
end