golem icon indicating copy to clipboard operation
golem copied to clipboard

run_dev for modules

Open Cervangirard opened this issue 6 years ago • 0 comments

run_dev is a great tool. maybe we could use it for each module created with add_module, a run_dev_module :

Something like :

# Set options here
options(golem.app.prod = FALSE) # TRUE = production mode, FALSE = development mode

# Detach all loaded packages and clean your environment
golem::detach_all_attached()
# rm(list=ls(all.names = TRUE))

# Document and reload your package
golem::document_and_reload()

library(shiny)
# Run the application
ui <- fluidPage(
  mod_my_first_module_ui("jean")
)
server <- function(input,output,session){
  callModule(mod_my_first_module_server,"jean")
}

shinyApp(ui, server)

Cervangirard avatar May 24 '19 12:05 Cervangirard