I've got a rails application it contains web interface and api.
I want to rewrite api using sinatra. I want all requests to "/api/..." to be handled by sinatra and ignored by rails.
Is that possible?
Yes it is possibile. See mount. With that you can do something like:
FooApp::Application.routes.draw do
root :to => 'welcome#index'
mount FooAppApi => "/api"
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With