-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.ru
More file actions
45 lines (32 loc) · 848 Bytes
/
config.ru
File metadata and controls
45 lines (32 loc) · 848 Bytes
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
42
43
44
45
require_relative 'app'
if ENV['NEW_RELIC_KEY']
require 'newrelic_rpm'
end
if ENV['DEBUG']
configure :production do
set :logging, Logger::DEBUG
end
end
if ENV['SENTRY_DSN'].to_s.length > 0
require 'raven'
Raven.configure do |config|
config.dsn = ENV['SENTRY_DSN']
config.sanitize_fields = ["token"]
end
use Raven::Rack
end
unless ENV['WEB_ONLY']
SlackRubyBotServer::App.instance.prepare!
SlackRubyBotServer::Service.start!
run SlackRubyBotServer::Api::Middleware.instance
end
unless ENV['BOT_ONLY']
require 'sass/plugin/rack'
use Sass::Plugin::Rack
use Rack::Static,
urls: ['/stylesheets'],
root: File.expand_path('../tmp', __FILE__)
Sass::Plugin.options.merge!(template_location: 'public/stylesheets',
css_location: 'tmp/stylesheets')
run Aloha::Web.new
end