Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config.box2.path option #36

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading