Hi everyone. I hope you can help me with my question regarding plumber, RStudio Connect and dependent script files. I am currently developing a solution locally utilizing plumber and thinking ahead to productionized options I am looking at publishing the API to RStudio Connect. When run locally, I have multiple .R scripts (table_specs, load_functions, table_item_info etc) that are run first defining functions and generating variables that are stored in the global environment. These scripts only need to be run/loaded once and shouldn’t be reloaded every time the API endpoint is hit.
My question is, how is something like this handled by RStudio Connect? Can functions and variables be published and stored in Connect and then available to the API script? Should everything be put in a package which then gets bundled when published? How can the scripts that define the variables be run once when published but not whenever the API is accessed? Sorry is this is confusing. Thanks in advance.