Skip to content

Instantly share code, notes, and snippets.

@benrudolph
Created January 23, 2013 17:59
Show Gist options
  • Save benrudolph/4611068 to your computer and use it in GitHub Desktop.
Save benrudolph/4611068 to your computer and use it in GitHub Desktop.
Setup local server files
use Rack::Static,
:urls => ["/lib", "/css", "/images", "/data", "/js", "/bootstrap"],
:root => "public"
run lambda { |env|
[
200,
{
'Content-Type' => 'text/html',
'Cache-Control' => 'public, max-age=86400'
},
File.open('public/index.html', File::RDONLY)
]
}
source 'https://rubygems.org'
gem 'rack'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment