Closed michielbdejong closed 1 month ago
Yeah, that would be an improvement. The next version of Earthstar (which is now getting closer) will let you set the known shares directly on the Peer
using capabilities, and then you can pass that peer into the server constructor.
This is strictly a nice-to-have, but maybe worth documenting anyway:
In my code I need to dynamically start an Earthstar Server for a number of shares, whose names I cannot predict at build time. I ended up saving the share names to a file at runtime, and then adding the name of that file as
knownSharesPath
but it's currently the only reason I need to give deno--allow-read
and--allow-write
, so would be nice if I could pass the known shares as a JavaScript array instead.