Created
April 7, 2014 02:37
-
-
Save nbatalla03/10014099 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rack' | |
require 'rack/contrib/try_static' | |
use ::Rack::TryStatic, | |
:root => "build", # where middleman files are generated | |
:urls => %w[/] # match all requests | |
:try => ['.html', 'index.html', '/index.html'] # try these postfixes sequentially | |
# 404 | |
run lambda { [404, {'Content-Type' => 'text/plain'}, [' File not found.']]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment