From 44789b4825e83faade13c0b9cb8313d7563c0344 Mon Sep 17 00:00:00 2001 From: Daan Wynen Date: Mon, 12 Jul 2021 19:28:10 +0200 Subject: [PATCH] Remove some ambiguity around pub announcements The use of `{curly braces}` was a little unfortunate since they are also heavily used in JSON/JS notation. Hopefully this clears out any ambiguity around what should be done and what the result should be. --- guides/pubs/announce-a-pub-server.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/guides/pubs/announce-a-pub-server.md b/guides/pubs/announce-a-pub-server.md index 428afd1..9aede23 100644 --- a/guides/pubs/announce-a-pub-server.md +++ b/guides/pubs/announce-a-pub-server.md @@ -1,12 +1,27 @@ # Announce a Pub Server -To announce a pub server, publish this `pub` message: +To announce a pub server, publish this `pub` message, replacing the parts in quotes with your pub server's values: ```bash -ssb-server publish --type pub --address.key {feedId} --address.host {string} --address.port {number} +ssb-server publish --type pub --address.key "@myPubId.ed25519" --address.host "awesomepub.mydomain.org" --address.port 8008 ``` + +You can achieve the same from JavaScript like such: ```js -sbot.publish({ type: 'pub', address: { key: feedId, host: string, port: number } }, cb) +sbot.publish({ type: 'pub', address: { key: pubId, host: string, port: number } }, cb) ``` -Scuttlebot, and any user that follows you, will add the pub to their peer list, and begin contacting it for syncing. +`ssb-server`, and any user that follows you, will add the pub to their peer list, and begin contacting it for syncing. + +If you do this correctly, the newest message of your pub should look like this: + +```terminal +$ ssb-server getLatest '@myPubId=.ed25519' | jq '.value.content' +{ + "type": "pub", + "address": { + "key": "@myPubId.ed25519", + "host": "awesomepub.mydomain.org", + "port": 8008 +} +```