This repository has been archived by the owner on Nov 2, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rackup and Procfile for development
- Loading branch information
1 parent
d5acb58
commit e025aec
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: shotgun --port $PORT --host 0.0.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require "bundler" | ||
rack_env = ENV.fetch("RACK_ENV", "development").to_sym | ||
Bundler.setup(:default, rack_env) | ||
|
||
# ensure our application is in the $LOAD_PATH | ||
libdir = File.expand_path("../lib", __FILE__) | ||
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir) | ||
|
||
# Load environment variables from .env files | ||
# (gives priority to local files too) | ||
require "dotenv" | ||
Dotenv.load ".env.#{rack_env}", ".env" | ||
|
||
require "power" | ||
|
||
map "/" do | ||
run Power::Application | ||
end |