git ssb

2+

Dominic / ssb-client



Tree: e7b4beb56321323338362cee9e112fa749bc385c

Files: e7b4beb56321323338362cee9e112fa749bc385c / README.md

548 bytesRaw

ssb-client v1

scuttlebot client


var Client = require('./')

var config  = require('ssb-config')
var ssbKeys = require('ssb-keys')
var keys = ssbKeys.loadOrCreateSync(config)

function abortIf (err) {
  if(err) throw err
}

var client = Client(keys, config)
  .connect(abortIf) //auth is automatic

client.publish({
  type: 'post', text: 'hello, world!'
}, function (err, msg) {
  abortIf(err)
  console.log(msg)
  client.close()
})

License

MIT, Copyright 2015 Paul Frazee and Dominic Tarr

Built with git-ssb-web