-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathapp.rb
More file actions
25 lines (23 loc) · 672 Bytes
/
app.rb
File metadata and controls
25 lines (23 loc) · 672 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
require 'sinatra/base'
require 'sinatra/contrib'
require 'haml'
require 'json'
require_relative 'routes/init'
require_relative 'helpers/init'
module CaptainADB
class App < Sinatra::Base
configure do
root_dir = File.dirname(__FILE__)
set :root, root_dir
set :app_file, File.join(root_dir, File.basename(__FILE__))
set :views, "#{root_dir}/views"
set :public_folder, "#{root_dir}/public"
set :screenshot_dir, "#{settings.public_folder}/img/screenshots"
set :screenshot_files, []
set :show_exceptions, :after_handler
enable :sessions
register Sinatra::Namespace
helpers Sinatra::JSON
end
end
end