git ssb

2+

Dominic / ssb-client



Tree: efa2e64385b5a9b4754d14271c1a1e14883f7e58

Files: efa2e64385b5a9b4754d14271c1a1e14883f7e58 / example.js

343 bytesRaw
1
2var Client = require('./')
3
4var config = require('ssb-config')
5var ssbKeys = require('ssb-keys')
6var keys = ssbKeys.loadOrCreateSync(config)
7
8function abortIf (err) {
9 if(err) throw err
10}
11
12var client = Client(keys, config)
13 .connect(abortIf)
14
15client.whoami(function (err, whoami) {
16 abortIf(err)
17 console.log(whoami)
18 client.close()
19})
20

Built with git-ssb-web