Skip to content

Instantly share code, notes, and snippets.

@ys
Created April 15, 2015 11:01
Show Gist options
  • Save ys/6a807c06f04768be66c7 to your computer and use it in GitHub Desktop.
Save ys/6a807c06f04768be66c7 to your computer and use it in GitHub Desktop.
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
source 'https://rubygems.org'
gem 'puma'
gem 'rack'
GEM
remote: https://rubygems.org/
specs:
puma (2.10.2)
rack (>= 1.1, < 2.0)
rack (1.6.0)
PLATFORMS
ruby
DEPENDENCIES
puma
rack
<h1>Hello from s3, YO</h1>
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