Skip to content

Instantly share code, notes, and snippets.

@gisthero
Created May 13, 2013 10:48
Show Gist options
  • Save gisthero/5567503 to your computer and use it in GitHub Desktop.
Save gisthero/5567503 to your computer and use it in GitHub Desktop.
Rack on Heroku
use Rack::Static
run lambda { |env|
[
200,
{
'Content-Type' => 'text/html',
'Cache-Control' => 'public, max-age=86400'
},
File.open('./index.html', File::RDONLY)
]
}
source 'https://rubygems.org'
gem 'rack'
GEM
remote: https://rubygems.org/
specs:
rack (1.5.2)
PLATFORMS
ruby
DEPENDENCIES
rack
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment