-
Notifications
You must be signed in to change notification settings - Fork 131
Automate to set webhook url in example v2 #559
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
base: master
Are you sure you want to change the base?
Conversation
examples/v2/kitchensink/app.rb
Outdated
)) | ||
|
||
if code == 200 | ||
p "✅ LINE Webhook URL set to #{webhook_endpoint}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inside configure
, logger
can't be used, so this uses just printing to stdout. Is there any way to use logger?
8a1b31c
to
80b0a6f
Compare
examples/v2/kitchensink/app.rb
Outdated
@@ -3,7 +3,7 @@ | |||
require 'line-bot-api' | |||
|
|||
set :environment, :production | |||
set :app_base_url, ENV['APP_BASE_URL'] | |||
set :app_base_url, ENV.fetch('APP_BASE_URL', nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Q] Why did you allow nil
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the time of writing this, I thought there might be cases where the callback URL isn't set during local testing, but on further reflection, there are no such cases. I used ENV.fetch(...) to ensure it errors when nil!
No description provided.