-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.rb
More file actions
34 lines (28 loc) · 737 Bytes
/
app.rb
File metadata and controls
34 lines (28 loc) · 737 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
require 'dotenv'
require 'sinatra/base'
require 'sinatra/json'
require 'sinatra/namespace'
require 'rollbar/middleware/sinatra'
Dotenv.load
# load all extension initilizers
require_relative 'config/initializers/init'
# load all controllers
require_relative 'domains/controllers_init'
class App < Sinatra::Base
use Rollbar::Middleware::Sinatra
configure do
set :server, :puma
end
configure :development do
set :protection, except: [:json_csrf]
end
configure :production do
set :raise_errors, false
set :show_exception, false
end
before do
content_type :json
# headers 'Access-Control-Allow-Origin' => 'https://airtable.com/',
# 'Access-Control-Allow-Methods' => %w[GET]
end
end