Created
January 18, 2017 23:29
-
-
Save pfrazee/f64c8de09edf154b945d9d7d04d080b5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // generate key | |
| var secretKey | |
| if (!key) { | |
| var keyPair = signatures.keyPair() | |
| key = keyPair.publicKey | |
| secretKey = keyPair.secretKey | |
| } | |
| // create the archive instance | |
| var archive = drive.createArchive({ | |
| key, | |
| secretKey, | |
| live: true, | |
| sparse: true, | |
| metadata: drive.core.createFeed({ | |
| key, | |
| secretKey, | |
| live: true, | |
| sparse: true, | |
| verifyReplicationReads: true, | |
| storage: raf(archivesDb.getArchiveFilesPath(key, 'meta')) | |
| }), | |
| content: drive.core.createFeed({ | |
| sparse: true, | |
| verifyReplicationReads: true, | |
| storage: raf(archivesDb.getArchiveFilesPath(key, 'data')) | |
| }), | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment