Permalink
Browse files

Serve static files via Rack

Move static file serving directly to Rack. This passes off the load of
static file resolution directly to the server.
  • Loading branch information...
1 parent ab8030f commit 8f5fb530aedb4553a2bb4f61bac39ba945ae4283 @carlosdp carlosdp committed Aug 1, 2013
Showing with 20 additions and 0 deletions.
  1. +20 −0 config.ru
View
@@ -10,4 +10,24 @@ end
require 'app/app'
+map "/js" do
+ run Rack::Directory.new("./public/js")
+end
+
+map "/css" do
+ run Rack::Directory.new("./public/css")
+end
+
+map "/img" do
+ run Rack::Directory.new("./public/img")
+end
+
+map "/favicon.ico" do
+ run Rack::File.new("./public/favicon.ico")
+end
+
+map "/robots.txt" do
+ run Rack::File.new("./public/robots.txt")
+end
+
run Hurl::App.new

0 comments on commit 8f5fb53

Please sign in to comment.