-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document adding a RESTful API #151
Comments
So I had already figured out how to do it on my own prior to looking at this. In essence all I did was modify config.ru to run SlackRubyBotServer alongside my Grape::API class...
|
It looks like the recommended way is to mount my Grape API in config/routes.rb for Rails 7. However, when I attempt to do that instead of the above it stops working. The only way I've been able to get both to successfully work together is the Cascade method above. |
I like the |
Yeah, I'm at the point now where the Cascade isn't working so great. I'm trying to understand better what your monkey-patch above is doing.. to see if I can get it working in my app. Not sure I quite understand what it's doing quite yet though. Thanks for the guidance so far! |
I have been unsuccessful in getting your monkey-patch to work yet. I tried adding the below to my config.ru. Which I thought was an equivalent to what you posted above.. but it continues to block other routes.
|
Coming from #150 (comment), document how to add a RESTful API.
This monkey-patching should work:
We should document, and possibly implement a cleaner way to do this.
It's a bit of a rabbit hole. The root endpoint is https://github.com/slack-ruby/slack-ruby-bot-server/blob/master/lib/slack-ruby-bot-server/api/endpoints/root_endpoint.rb, invoked from
slack-ruby-bot-server/lib/slack-ruby-bot-server/api/middleware.rb
Line 40 in 99e91ed
slack-ruby-bot-server/lib/slack-ruby-bot-server/api/middleware.rb
Line 15 in 99e91ed
The text was updated successfully, but these errors were encountered: