How to use the ssb-config.path function in ssb-config

To help you get started, we’ve selected a few ssb-config examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github stripedpajamas / scat / util / client / index.js View on Github external
const path = require('path')
const child = require('child_process')
const config = require('ssb-config')
const ssbKeys = require('ssb-keys')
const client = require('ssb-client')

config.keys = ssbKeys.loadOrCreateSync(path.join(config.path, 'secret'))

let retriesRemaining = 5
let server
let started = false

const tryConnect = (cb) => {
  retriesRemaining--
  // Check if sbot/scutlle-shell is already running
  client(config.keys, config, (err, sbot) => {
    // err implies no server currently running
    if (err) {
      // start scuttle shell if haven't already tried starting it
      if (!started) {
        server = child.fork(path.resolve(__dirname, './start'), {
          stdio: [
            'ignore',

ssb-config

load ssb config

MIT
Latest version published 3 years ago

Package Health Score

46 / 100
Full package analysis