Description Usage Arguments Examples
View source: R/modularServer.R
Loops through modules, loading server code into Shiny via source()
if files exist.
1 | modularServer(module.dir, module.file, environment)
|
module.dir |
Path to the parent directory containing module directories |
module.file |
Name of file within module directories containing server code |
environment |
|
1 2 3 4 5 6 7 8 9 10 11 | # Load server.R files into the server environment
## Not run:
server <- function(input, output, session) {
modularServer(
module.dir = file.path('.', 'modules'),
module.file = 'server.R',
environment = environment()
)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.