R/get_app_connection.R

Defines functions get_app_connection

Documented in get_app_connection

#' Get the app connection from the environment
#' @description Call the app connection. The connection is set in the function `set_app_connection`. 
#'
#' @return returns a the app connection to the app data.
#' @export
#' 
#' @examples
#' # Establish a connection to the PostgreSQL database
#' set_app_connection(
#'   dbname = "vmc",
#'   host = "apps-server.idems.international",
#'   port = 5432,
#'   user = "vmc",
#'   password = "LSQkyYg5KzL747"
#' )
#' 
#' get_app_connection()
#' 
get_app_connection <- function() {
  get("app_con", envir = pkg_env)
}

Try the openappr package in your browser

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

openappr documentation built on Oct. 4, 2024, 9:07 a.m.