On production my application runs in a virtual directory
eg /virt/action
get '/action' ... end
I want to have the /virt
also when running sinatra in development mode, is there a way to do that?
On production my application runs in a virtual directory
eg /virt/action
get '/action' ... end
I want to have the /virt
also when running sinatra in development mode, is there a way to do that?
Try using Rack middleware. You should be able to use a middleware class only in development that intercepts /virt/action and remaps it to /action. This may be overkill in your case, but Rack Rewrite would probably do the trick.