📄 | README.md |
📄 | autoclose.js |
📄 | control.js |
📄 | index.js |
📄 | package.json |
📄 | server.js |
📄 | test.js |
ssb-party
Get a scuttlebot client instance. If scuttlebot isn't running, start it in the background, and keep it running until all the clients have disconnected.
Usage
var createSsbParty = require('ssb-party')
createSsbParty([[keys, ]opts, ]cb)
optional arguments:
keys
: an ssb-keys instanceopts.host
: host to connect to or start the server onopts.port
: port to connect to or start the server onopts.appKey
: secret-stack capability key (Buffer)opts.out
: where to put standard output of sbotopts.err
: where to put standard error of sbot
opts.out
and opts.err
may be a file descriptor, or "inherit"
to pass through to the controlling terminal, or "ignore"
to discard. default is to log to a file, ~/.ssb/out.log
.
Other properties of the opts
object will be used as ssb-config
overrides, but if the server is already running, the existing server's config
will not be updated.
Example
simplest case: connect to or start a local sbot:
var party = require('ssb-party')
party(function (err, sbot) {
// ...
})
Config
config.timers.keepalive
: minimum time (ms) to keep the server online after the last client disconnects. default: 30s
License
Copyright (c) 2017 @cel
Usage of the works is permitted provided that this instrument is retained with the works, so that any entity that uses the works is notified of this instrument.
DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
Built with git-ssb-web