Closed merlinoa closed 5 years ago
Added with 20267c72bb83350ab5e67dd32042d78f2de5f005
The Shiny session
can't be accessed from "global.R", so this function won't work as intended in its current format. Is there another way to determine the run environment of the Shiny app?
Completed with 26cf65c277658dcd5d3f64a95f5781c7b4d5502d. Updated documentation with 3339de9dffd6208b1a20a4e4f09d2eb0b7cd3bf3.
looks good to me
@phoward38 @RichardHHill please work on this one together. Make sure to document the function and update the package docs.
This functions should check
session$clientData$hostname
to determine if the app is running locally or if it is deployed somewhere (e.g. shinyapps.io). If it is running locally it should set the the config environment to "default" usingSys.setenv(R_CONFIG_ACTIVE = "default")
. If it is deployed it should set it to production usingSys.setenv(R_CONFIG_ACTIVE = "production")
.We will use this app in "global.R", so we no longer need to set this manually.
Have the app take 1 argument
override
that can be used to override whether the config env is set to "default" or "production". The only valid values for this argument should be "default", "production", orNULL
. It should be NULL by default.