R/run_app.R

Defines functions run_app

Documented in run_app

# This is where the web app starts

#Sys.setenv(R_CONFIG_ACTIVE = "local")


#' Run the Personal Science CGM Web Application
#' @title Personal Science Web App
#' @param mode character string indicating operational mode: Uses config::get() or "run" (default)
#' @export
#' @import shiny
run_app <- function(mode = attr(config::get(),"config")){
  if(mode == "run") {Sys.setenv(R_CONFIG_ACTIVE = "local")}
  else Sys.setenv(R_CONFIG_ACTIVE = mode)
  shinyApp(ui = ui,
           server = server)

}
personalscience/psi-shiny-cgm documentation built on Dec. 22, 2021, 7:43 a.m.