var page = require('../page.part')
var com = require('../com.part')
module.exports = () => page({
tab: 'basics',
path: '/basics/read-the-log.html',
content: `
Read the log
${ com.code({ js: jsSnippet, bash: bashSnippet }) }
Publish a message
`
})
var jsSnippet = `
var pull = require('pull-stream')
pull(
ssb.createLogStream({ limit: 100 }),
pull.collect(err, msgs) {
if (err)
throw err
console.log(msgs)
})
)
`
var bashSnippet = `
sbot log --limit 100
`