The entrypoint for a Rhino application.
app.R should contain nothing but a call to
An object representing the app (can be passed to
This function is a wrapper around
rhino.yml and performs some configuration steps (logger, static files, box modules).
You can run a Rhino application in typical fashion using
Rhino will load the
app/main.R file as a box module (
It should export two functions which take a single
id argument -
server of your top-level Shiny module.
It is possible to specify a different way to load your application
legacy_entrypoint option in
app_dir: Rhino will run the app using
source: Rhino will
source("app/main.R"). This file should define the top-level
serverobjects to be passed to
box_top_level: Rhino will load
app/main.Ras a box module (as it does by default), but the exported
serverobjects will be considered as top-level.
legacy_entrypoint setting is useful when migrating an existing Shiny application to Rhino.
It is recommended to transform your application step by step:
app_diryou should be able to run your application right away (just put the files in the
sourcesetting your application structure must be brought closer to Rhino, but you can still use
box_top_levelyou can be confident that the whole app is properly modularized, as box modules can only load other box modules (
The last step is to remove the
legacy_entrypointsetting completely. Compared to
box_top_levelyou'll need to make your top-level
serverinto a Shiny module (functions taking a single