I want to extend Middleman::Application to serve a new Rack::Builder instance.
I tried the same approach used by Middleman::MetaPages
:
server = ::Middleman::Application.server
rack_app = Rack::Builder.new do
map '/foo' do
[200, { 'Content-Type' => 'text/html' }, "That is a foo page."]
end
end
server.use '/foo_root', rack_app
Running middleman
runs without exceptions, but my foo page isn’t reachable. Got 404 instead. Suggestions#any?