#' db_connect
#'
#' @param db_config a named list with your database credentials:
#' - dbname
#' - host
#' - port
#' - user
#' - password
#'
#' @export
#'
#' @importFrom pool dbPool
#' @importFrom RPostgres Postgres
#'
#'
db_connect <- function(db_config) {
pool::dbPool(
RPostgres::Postgres(),
dbname = db_config$dbname,
host = db_config$host,
port = db_config$port,
user = db_config$user,
password = db_config$password
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.