R/app_server.R

Defines functions app_server

#' The application server-side
#'
#' @param input,output,session Internal parameters for \code{shiny}.
#'     DO NOT REMOVE.
#' @import shiny
#' @importFrom rlang .data
#' @noRd
app_server <- function(input, output, session) {

  # Load reference libraries
  resources <- resources()

  # Make nmtran ACE mode available
  # acePath <- installed.packages() %>%
  #   as.data.frame() %>%
  #   dplyr::filter(Package == "shinyAce") %>%
  #   dplyr::pull(LibPath)
  # acePath <- file.path(acePath, "shinyAce/www/ace/")
  # if ( !file.exists(file.path(acePath, "mode-nmtran.js")) ){
  #   message(file.access(acePath, 2))
  #   file.copy(
  #     from = "./inst/resources/mode-nmtran.js",
  #     to = file.path(acePath, "mode-nmtran.js")
  #   )
  # }

  # New model module
  new_model_server(
    session = session,
    input = input,
    output = output,
    resources = resources
  )

}

Try the pmxcode package in your browser

Any scripts or data that you put into this service are public.

pmxcode documentation built on Oct. 19, 2024, 5:07 p.m.