if (interactive()) {
# Connect using settings from .env
db <- sd_db_connect()
# Use local storage instead of database
db <- sd_db_connect(ignore = TRUE)
# Close connection when done
if (!is.null(db)) {
pool::poolClose(db$db)
}
}
Run the code above in your browser using DataLab