ssbc / ssb-config

standard configuration for ssb
MIT License
23 stars 18 forks source link

document config options #10

Closed dominictarr closed 5 years ago

dominictarr commented 8 years ago

there are a number of configuration options that apply to core scuttlebutt these should be documented. as requested by @dust in this patchwork post: %rDXQexDAKASv4MB41TPW+koLqqE7uIiLGXwE7hdUjkE=.sha256

quick notes:

{
    host: nonPrivate.v4 || '', //your ip address to listen on
    port: 8008, //port to listen on.
    timeout: 30e3, //time to keep a connection on. 0 means forever.
    pub: true, //?
    local: true, // broadcast yourself on local network.
    friends: { //hmm, Should plugin config be moved into the plugin?
      dunbar: 150, //max number of peers to replicate
      hops: 3  //number of (follow) hops out from you.
    },
    gossip: {
      connections: 3 //how many connections to have at one time.
    },
    path: path.join(home(), '.' + name), //directory to keep db and blobs and secret
    master: [], //list of public keys that get full access via api. set on your pub server and connect remotely.
    logging: { level: 'notice' }, //What other values work for this?
    party: true //disable quotas

I don't know what pub does, and don't know what the possible values are for logging @pfraze ?

maybe config for plugins should not be maintained in this module? ... plugin defaults should be set in the plugin. probably documented there too? I guess we have core plugins, so we could aggregate all the docs for those.

pfrazee commented 8 years ago

Check the readme, some of these are documented (pub and logging are)

Is dunbar still used? I checked the graphmitter code and I dont think it is. EDIT: nm, jus saw your response

dominictarr commented 8 years ago

oh, so pub: false should set lan only mode! looking at the code that was removed. no one has complained about that though, so I guess no one was using it.

But just the fact that we had config and we didn't know what it did shows we are doing something wrong.

pfrazee commented 8 years ago

I agree, config has been a bit haphazard.

I'd like for us to create a config "oracle" like I did in ssb-web-server: https://github.com/ssbc/ssb-web-server/blob/master/config.js

That gives us a nice tool to validate config, and the getters let us do computed config

dominictarr commented 8 years ago

careful buddy! better not call it that, we might get sued!

pfrazee commented 8 years ago

LarryEllisonLawsuitFactory()

nichoth commented 6 years ago

Hello, I wanted to ask about the scope of ssb-config. There seem to be some absent fields in the readme, like keys and appname

dominictarr commented 6 years ago

keys isn't really a config option (it's not loaded by this library, but I think sbot and ssb-client attach it to the config on loading...) appname really should be described in the readme though.

tomquas commented 6 years ago

i'm confused with config.local. it seems to be replace by config.gossip.local. no?!?

dominictarr commented 6 years ago

correct. it's gossip.local

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.