if (FALSE) { # interactive()
# Fetch from public sync server
doc <- sync_fetch("wss://sync.automerge.org", "4F63WJPDzbHkkfKa66h1Qrr1sC5U")
# Fetch from local server with debug output
doc <- sync_fetch(server$url, "myDocId", verbose = TRUE)
# Fetch from server with self-signed certificate
cert <- nanonext::write_cert()
tls <- nanonext::tls_config(client = cert$client)
doc <- sync_fetch(server$url, "myDocId", tls = tls)
# Fetch from authenticated server
doc <- sync_fetch(
"wss://secure.example.com",
"myDocId",
token = "eyJhbGciOi..."
)
# Inspect the document
automerge::am_keys(doc)
}
Run the code above in your browser using DataLab