Skip to content

Instantly share code, notes, and snippets.

@phawk
Created September 1, 2014 19:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phawk/0fe64a0856366100ecf0 to your computer and use it in GitHub Desktop.
Save phawk/0fe64a0856366100ecf0 to your computer and use it in GitHub Desktop.
Middleman config.ru for usage with pow/anvil for mac
# From: https://github.com/middleman/middleman/pull/560
require "rubygems"
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 = { latency: 0.25 }
@app = new_app
start_file_watcher
end
end
Middleman::PreviewServer.preview_in_rack
run Middleman::PreviewServer.app.class.to_rack_app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment