-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.R
More file actions
21 lines (17 loc) · 722 Bytes
/
app.R
File metadata and controls
21 lines (17 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Thin wrapper so Shiny Server can serve the app from the repo root (e.g., /richStudio)
if (file.exists("renv/activate.R")) {
source("renv/activate.R")
}
# Make module functions (homeTabUI, etc.) available whether or not the package is installed.
if (requireNamespace("richStudio", quietly = TRUE)) {
library(richStudio)
} else if (requireNamespace("devtools", quietly = TRUE)) {
devtools::load_all(".", export_all = FALSE)
}
library(shiny)
app_dir <- file.path("inst", "application")
if (!dir.exists(app_dir)) {
stop("richStudio application directory not found at inst/application", call. = FALSE)
}
# Return the packaged app; Shiny Server picks up the shiny.appobj produced here.
shiny::shinyAppDir(app_dir)