-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ru
28 lines (20 loc) · 1 KB
/
config.ru
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
# This commands assumes Bundler is installed. Type `which bundler` in your
# terminal to verify. Run `gem install bundler` if it's not installed.
require 'bundler'
# Shorthand for a bunch of ` require 'some_gem' ` commands. All gems
# are now 'preloaded' and ready to be used.
Bundler.require
# File.dirname(FILE) finds the name of the parent directory of the current file
# The below join method converts to something like 'pd/lib/darlyne', where
# pd is the 'parent directory'
require File.join(File.dirname(__FILE__), 'lib', 'darlyne')
require File.join(File.dirname(__FILE__), 'lib', 'application_controller')
DarlyneFramework = Darlyne.new
# Load the routes
require File.join(File.dirname(__FILE__), 'config', 'routes')
# Load helpers
require File.join(File.dirname(__FILE__), 'app', 'helpers/application_helper')
# Load the public folder with all static files for later availability
use Rack::Static, :urls => ["/css", "/images", "/js"], :root => "public"
# Rack starts the application
run ApplicationController.new