Skip to content

Instantly share code, notes, and snippets.

@commadelimited
Last active October 24, 2016 05:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save commadelimited/4771079 to your computer and use it in GitHub Desktop.
Save commadelimited/4771079 to your computer and use it in GitHub Desktop.
Config.ru example
use Rack::Static,
:urls => ["/images", "/js", "/css", "/data"],
:root => "public"
run lambda { |env|
[
200,
{
'Content-Type' => 'text/html',
'Cache-Control' => 'public, max-age=86400'
},
File.open('public/index.html', File::RDONLY)
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment