Created
January 15, 2012 08:08
-
-
Save ebryn/1615017 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input "app" | |
output "public" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rake-pipeline' | |
require 'rake-pipeline/middleware' | |
require "rack/streaming_proxy" # Don't forget to install the rack-streaming-proxy gem. | |
use Rack::StreamingProxy do |request| | |
# Insert your own logic here | |
if request.path.start_with?("/api") | |
"http://localhost#{request.path.sub("/api", "")}" | |
end | |
end | |
use Rake::Pipeline::Middleware, 'Assetfile' # This is the path to your Assetfile | |
run Rack::Directory.new('public') # This should match whatever your Assetfile's output directory is |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment