Skip to content

Instantly share code, notes, and snippets.

@smt116
Forked from sabcio/Gemfile
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smt116/1c5a59b8c2ea5835679d to your computer and use it in GitHub Desktop.
Save smt116/1c5a59b8c2ea5835679d to your computer and use it in GitHub Desktop.
use Rack::Static,
:urls => ["/images", "/js", "/css"],
:root => "public"
run lambda { |env|
[
200,
{
'Content-Type' => 'text/html',
'Cache-Control' => 'public, max-age=86400'
},
File.open('public/index.html', File::RDONLY)
]
}
- application-name
|- config.ru
|- Gemfile
|- Rakefile
|- public
|- index.html
|- images
|- js
|- css
source :rubygems
gem 'rack'
gem 'rake'
gem 'thin', group: :production
namespace :db do
task :migrate
task :setup
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment