Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
Added config.ru
Browse files Browse the repository at this point in the history
While we don't use Rack to serve our documentation publicly, being
Rack-compatible is useful for local development (such as with
http://pow.cx).  This includes the necessary voodoo to make
middleman play nicely with Rack.
  • Loading branch information
Tammer Saleh committed Dec 20, 2013
1 parent 1ad3700 commit 900a206
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions config.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require "rubygems"
require "bundler/setup"
require "middleman-core/load_paths"

Middleman.setup_load_paths

require "middleman-core"
require "middleman-core/preview_server"

module Middleman::PreviewServer
def self.preview_in_rack
@options = { }
@app = new_app
start_file_watcher
end
end

Middleman::PreviewServer.preview_in_rack
run Middleman::PreviewServer.app.class.to_rack_app

0 comments on commit 900a206

Please sign in to comment.