Skip to content

Instantly share code, notes, and snippets.

@andrewmp1
Created September 19, 2012 04:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewmp1/3747713 to your computer and use it in GitHub Desktop.
Save andrewmp1/3747713 to your computer and use it in GitHub Desktop.
config.ru for ember rack app
require 'rake-pipeline'
require 'rake-pipeline/middleware'
use Rake::Pipeline::Middleware, 'Assetfile'
# require 'rack/streaming_proxy'
# use Rack::StreamingProxy do |request|
# if request.path.start_with?('/proxy')
# path = request.path
# if request.query_string
# path = "#{path}?#{request.query_string}"
# end
# "http://127.0.0.1:8080#{path}"
# end
# end
require 'rack-rewrite'
use Rack::Rewrite do
rewrite %r{^(.*)\/$}, '$1/index.html'
end
run Rack::Directory.new('.')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment