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.
Some homes and offices can't accept peer-to-peer connections over the Internet. You can solve this with "NAT Hole-Punching," but it can be slow and sometimes fails. Instead, Scuttlebot solves this with Pubs.
Pubs are bot-users that have public IP addresses, and who follow real users. They dont have any special authority, but they do keep your data backed up and easy-to-access. You can have more than one, and change pubs any time, but you need at least one to reach friends over the net.
If you want to only sync by Wifi, or dont want to sync with anyone at all, you can skip this step.
First get an invite-code from a Pub operator, or create your own Pub. You can ask for invites via the #scuttlebutt channel, on Freenode.
To use the invite, follow this command:
${ com.code({ js: jsSnippet, bash: bashSnippet }) }Your Scuttlebot will now connect to, and sync with, the Pub. Other users can then sync with the pub to receive your feed.
` }) var jsSnippet = ` sbot.invite.accept(code, function (err) { // ... }) ` var bashSnippet = ` sbot invite.accept {code} `