Last Updated: February 25, 2016
·
1.354K
· lordkeper

Run middleman with pow and bundler

Create a config.ru with this content:

require 'rubygems'
require 'middleman'
require 'middleman-core/preview_server'

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

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

2 Responses
Add your response

I do not know why @app appear as a html link on the code example, it's not.

Now I always use my own middleman template with this config.ru and some basic asset folder structure.

over 1 year ago ·