I'm developing a Rails application that uses an API backend for AJAX requests written with Sinatra.
The API runs separately from Rails:
Rails: localhost:3000
API: localhost:9393
In production, we'll be proxying requests to the API with nginx.
The problem is that we don't have nginx in development mode, we're using thin. So I need some sort of Rack middleware that I can add in development mode to proxy the requests for me.
Can someone give me an example of how to do this?