with_db <- function(fn) {
db_connection <- DBI::dbConnect(RSQLite::SQLite(), tempfile())
initialise_db(db_connection)
invisible(fn(db_connection))
teardown(invisible(DBI::dbDisconnect(db_connection)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.