Move static file handler to be called after the instance handler

This way only routes that are not caught by the instance handler will go
through to the static file handler.
This commit is contained in:
Zamith 2015-01-31 14:39:50 +00:00
parent 5c4eaa99e2
commit 8cf04b58ca
No known key found for this signature in database
GPG Key ID: 19A0272A28FE3B16
3 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
require "spec_helper"
require "./spec_helper"
describe "Frank::Handler" do
it "routes" do

View File

@ -1,4 +1,4 @@
require "spec_helper"
require "./spec_helper"
describe "Route" do
describe "match" do

View File

@ -11,8 +11,8 @@ at_exit do
config = Frank.config
handlers = [] of HTTP::Handler
handlers << HTTP::LogHandler.new
handlers << HTTP::StaticFileHandler.new("./public")
handlers << Frank::Handler::INSTANCE
handlers << HTTP::StaticFileHandler.new("./public")
server = HTTP::Server.new(config.port, handlers)
server.ssl = config.ssl