Files: 9e4b77aeb7181a93a9ee3ceb1c21d11841a35f57 / tmpl / basics / open-a-client.html.js
580 bytesRaw
1 | var page = require('../page.part') |
2 | var com = require('../com.part') |
3 | |
4 | module.exports = () => page({ |
5 | tab: 'basics', |
6 | path: '/basics/open-a-client.html', |
7 | content: ` |
8 | <h2>Open a client</h2> |
9 | ${ com.code({ js: jsSnippet }) } |
10 | <p class="next"><a href="/basics/read-the-log.html">Read the log</a></p> |
11 | <ul class="see-also"> |
12 | <li><a href="/modules/ssb-client.html">SSB-Client API</a> for config options.</li> |
13 | </ul> |
14 | ` |
15 | }) |
16 | |
17 | var jsSnippet = ` |
18 | var ssbClient = require('ssb-client') |
19 | ssbClient(function (err, ssb) { |
20 | if (err) |
21 | throw err |
22 | |
23 | // ssb is now ready |
24 | })` |
Built with git-ssb-web