refactoring app

This commit is contained in:
2025-06-22 16:20:15 +03:00
parent 8dfd85736b
commit 9fd1874c72
6 changed files with 566 additions and 302 deletions

30
modules/global_options.R Normal file
View File

@@ -0,0 +1,30 @@
# box ========
.on_load = function(ns) {
message(
'Loading module "', box::name(), '"\n',
'Module path: "', basename(box::file()), '"'
)
set_global_options()
}
# ================
#' @export
#' @description костыли для упрощения работы себе
set_global_options <- function(
SYMBOL_DELIM = "; ",
APP.DEBUG = FALSE,
APP.FILE_DB = fs::path("data.sqlite"),
shiny.host = "127.0.0.1",
shiny.port = 1337,
...
) {
options(
SYMBOL_DELIM = SYMBOL_DELIM,
APP.DEBUG = APP.DEBUG,
APP.FILE_DB = APP.FILE_DB,
shiny.host = shiny.host,
shiny.port = shiny.port,
...
)
}