Skip to content

Commit 17ff9b4

Browse files
committed
Add environment.rb file
1 parent 7d78dad commit 17ff9b4

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

config.ru

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require ::File.expand_path('../environment', __FILE__)
2+
set :app_file, __FILE__
3+
run Sinatra::Application

environment.rb

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __FILE__)
2+
3+
require 'sinatra'
4+
5+
require 'bundler/setup'
6+
require 'rubygems'
7+
8+
require 'uri'
9+
require 'pathname'
10+
11+
12+
APP_ROOT = Pathname.new(File.expand_path('../', __FILE__))
13+
APP_NAME = APP_ROOT.basename.to_s
14+
15+
#Load Controllers
16+
Dir[APP_ROOT.join('app', 'controllers', '*.rb')].each { |file| require file }

0 commit comments

Comments
 (0)