Skip to content

Commit

Permalink
Merge pull request #36 from ssbc/box2-path
Browse files Browse the repository at this point in the history
Add config.box2.path option
  • Loading branch information
Powersource authored Nov 7, 2023
2 parents fc874a8 + ac9db4a commit 5002571
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
2 changes: 1 addition & 1 deletion format.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5002571

Please sign in to comment.