Created
April 15, 2015 11:01
-
-
Save ys/6a807c06f04768be66c7 to your computer and use it in GitHub Desktop.
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
require 'rubygems' | |
require 'rack' | |
require 'open-uri' | |
class Static | |
def call(env) | |
[200, {"Content-Type" => "text/html"}, content] | |
end | |
def content | |
open('https://s3.amazonaws.com/yannick-io/index.html') | |
end | |
end | |
run Static.new |
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
source 'https://rubygems.org' | |
gem 'puma' | |
gem 'rack' |
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
GEM | |
remote: https://rubygems.org/ | |
specs: | |
puma (2.10.2) | |
rack (>= 1.1, < 2.0) | |
rack (1.6.0) | |
PLATFORMS | |
ruby | |
DEPENDENCIES | |
puma | |
rack |
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
<h1>Hello from s3, YO</h1> |
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
web: puma -p $PORT -e $RACK_ENV |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment