var com = require('../../com.part') var page = require('../../page.part') module.exports = () => page({ title: 'Join a Pub', section: 'docs', tab: 'docs-social', path :'/docs/social/join-a-pub.html', content: `

If you want to connect with users across the net, you need to be followed by a Pub server. This is sometimes called "joining" a Pub.

Join a Pub

First get an invite-code from a Pub operator, or create your own pub. Then:

${ com.code({ js: jsSnippet, bash: bashSnippet }) }

Your Scuttlebot will now connect to, and sync with, the Pub. Other users can sync with the pub to receive your feed.

Create a Pub

` }) var jsSnippet = ` sbot.invite.accept(code, function (err) { // ... }) ` var bashSnippet = ` sbot invite.accept {code} `