tmpl/apis/modules/ssb-config.mdView |
---|
6 | 6 | |
7 | 7 | ``` js |
8 | 8 | var config = require('ssb-config') |
9 | 9 | |
10 | | -// if you want to set up a test network, that |
11 | | -// doesn't collide with main ssb network, |
12 | | -// pass the name of that network in. |
| 10 | +//if you want to set up a test network, that |
| 11 | +//doesn't collide with main ssb pass the name of that network in. |
13 | 12 | |
14 | | -var test_config = require('ssb-config/inject')( |
15 | | - 'testnet', // name |
16 | | - { port: 9999 } // opts |
17 | | -) |
18 | | -// you can also pass a second argument, |
19 | | -// which overrides the default opts. |
| 13 | +var test_config = require('ssb-config/inject')('testnet', {port: 9999}) |
| 14 | +//you can also pass a second argument, which overrides the default defaults. |
20 | 15 | ``` |
21 | 16 | |
22 | 17 | ## Configuration |
23 | 18 | |
29 | 24 | * `friends.dunbar` *(number)* [`Dunbar's number`](https://en.wikipedia.org/wiki/Dunbar%27s_number). Number of nodes your instance will replicate. Defaults to `150`. |
30 | 25 | * `friends.hops` *(number)* How many friend of friend hops to replicate. Defaults to `3`. |
31 | 26 | * `gossip.connections` *(number)* How many other nodes to connect with at one time. Defaults to `2`. |
32 | 27 | * `path` *(string)* Path to the application data folder, which contains the private key, message attachment data (blobs) and the leveldb backend. Defaults to `$HOME/.ssb`. |
| 28 | +* `master` *(array)* Pubkeys of users who, if they connect to the Scuttlebot instance, are allowed to command the primary user with full rights. Useful for remotely operating a pub. Defaults to `[]`. |
| 29 | +* `logging.level` *(string)* How verbose should the logging be. Possible values are error, warning, notice, and info. Defaults to `notice`. |
33 | 30 | |
34 | 31 | There are some configuration options for the sysadmins out there. All configuration is loaded via [`rc`](https://github.com/dominictarr/rc). You can pass any configuration value in as cli arg, env var, or in a file. |
35 | 32 | |
36 | 33 | [View on Github](https://github.com/ssbc/ssb-config) |