Uh oh!
There was an error while loading. Please reload this page.
Remove run_heroku() and inspect environment vars for setting host and port - #75
Conversation
rpkyle
commented
Mar 31, 2019
@TahiriNadia If you could take a look at this one too, would be grateful. Thanks 🙂 |
| showcase = FALSE, | ||
| ...) { | ||
| if (!is.null(host)) self$server$host <- host | ||
| if (!is.null(port)) self$server$port <- as.numeric(port) |
There was a problem hiding this comment.
Do we still want these is.null checks?
There was a problem hiding this comment.
I left them in, but the effect of passing NULL here would just be to use port 8080 instead of 8050 (as this is the fiery default), while the host would still be 127.0.0.1. Makes sense to 🔪 these.
alexcjohnson
commented
Apr 1, 2019
Awesome! Looks good to me, but I'll let @TahiriNadia give the 💃 after verifying that this works as expected both locally and on Heroku. |
TahiriNadia
commented
Apr 1, 2019
I will check if this version is working |
TahiriNadia
commented
Apr 1, 2019
Pipeline:
Locally is working |
TahiriNadia
commented
Apr 1, 2019
In |
TahiriNadia
commented
Apr 1, 2019
|
@TahiriNadia Thanks for testing this. Can I ask whether you set the environment variable You may also wish to set |
TahiriNadia
commented
Apr 1, 2019
I will check |
TahiriNadia
commented
Apr 2, 2019
The error persists: |
An important change as a result of merging this PR: for parity with Python, app developers will now need to explicitly supply arguments when deploying to Heroku. In Python, we use port 8050 by default: ...and host is set to 127.0.0.1: https://github.com/plotly/dash/blob/ac10b2df1e49a153de00fc78b07242f439bb0b99/dash/dash.py#L1481 Heroku deployments will likely now require explicit host and port settings in |
rpkyle
commented
Apr 18, 2019
@alexcjohnson I just tested this locally and with the DashR docs, and it's working as intended. I think we're ready to merge, if you're willing to give me the 💃. |
This PR proposes to
run_heroku()methodrun_server()to inspect local environment variables ifhostandportare not provided127.0.0.1forhostand8050(rather than8080) forportCurrently, DashR provides two separate methods for launching the
fieryserver and serving up a Dash app. The first isrun_server():dashR/R/dash.R
Lines 414 to 418 in 3ff3c62
...and the second is
run_heroku():dashR/R/dash.R
Lines 419 to 423 in 3ff3c62
These differ predominantly in the way they set and handle default
hostandportvariables. It would be preferable to condense these into a single method calledrun_server(), and attempt to queryDASH_HOSTandDASH_PORTenvironment variables whenhostandportinformation is not supplied.Closes#73.