get_scidb_connection = function() {
if(get_default_connection(F)$has_connected()){
conn <- get_default_connection()
} else {
test_env <- Sys.getenv(c("SCIDB_TEST_HOST", "SCIDB_TEST_PORT", "SCIDB_USER", "SCIDB_PASSWORD"))
# set `save_token = T` for other non-default connection tests
conn <- arrayop::db_connect(username = test_env[["SCIDB_USER"]],
token = test_env[["SCIDB_PASSWORD"]],
host = test_env[["SCIDB_TEST_HOST"]],
port = test_env[["SCIDB_TEST_PORT"]],
save_token=T)
}
conn
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.