From ac9db4ab7e224518c4296e91757793a018bee640 Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Tue, 31 Oct 2023 14:24:44 +0100 Subject: [PATCH] Add config.box2.path option --- README.md | 4 ++++ format.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6154b1f..72452e8 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,10 @@ box2Format.setup({ keys }, () => { }) ``` +## Config + +The keys and data will by default be stored at `SSB_DIR/keyring`. You can change the `SSB_DIR` like normal by setting `config.path` and you can change the `"keyring"` part by setting `config.box2.path`. + [ssb db2]: https://github.com/ssb-ngi-pointer/ssb-db2/ [ssb-tribes]: https://github.com/ssbc/ssb-tribes/ [ssb-keyring]: https://gitlab.com/ahau/lib/ssb-keyring/ diff --git a/format.js b/format.js index 13f835f..5e11d9e 100644 --- a/format.js +++ b/format.js @@ -32,7 +32,7 @@ function makeEncryptionFormat() { function setup(config, cb) { const keyringPath = path.join( config.path || path.join(os.tmpdir(), '.ssb-keyring-' + Date.now()), - 'keyring' + (config.box2 && config.box2.path) || 'keyring' ) Keyring(keyringPath, (err, api) => { if (err) return cb(err)