Skip to content

Instantly share code, notes, and snippets.

@zzak
Created December 2, 2014 05:54
Show Gist options
  • Save zzak/0ece6f3d24bfcc8ce546 to your computer and use it in GitHub Desktop.
Save zzak/0ece6f3d24bfcc8ce546 to your computer and use it in GitHub Desktop.
require 'action_controller'
require 'action_dispatch'
require 'action_dispatch/middleware/static'
use ActionDispatch::Static, '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