Files: 20f85b8d98278bf1dd978dcd5e2d2ce0ceed922b / v00.js
384 bytesRaw
1 | const Connection = require('ssb-client') |
2 | |
3 | console.log('Connecting') |
4 | |
5 | Connection((err, server) => { |
6 | if (err) { |
7 | throw err |
8 | } |
9 | console.log('Connection established') |
10 | |
11 | server.whoami((err, keys) => { |
12 | if (err) console.log('could not get keys, got err', err) |
13 | else console.log('whoami details:', keys) |
14 | |
15 | console.log('disconnecting from server') |
16 | server.close() |
17 | }) |
18 | }) |
19 |
Built with git-ssb-web