I'm building a Plumber API and it saves logs. When I test it on my RStudio desktop or the RStudio server I want the log to into the here::here("logs") folder.
However, when it is being run by RStudio connect on the server, I want to save the logs in a different path.
The config package describes this, but in a nutshell: Your Connect server will set an environment variable called R_CONFIG_ACTIVE that you can read and respond to.
The config package gives you a way to set you default values in a single config.yml file, and then your code can respond differently, depending on the active configuration.