Skip to content

Instantly share code, notes, and snippets.

@nickwynja
Created April 14, 2020 00:29
Show Gist options
  • Save nickwynja/0f8374b423ae7aa00c69adf7fa984785 to your computer and use it in GitHub Desktop.
Save nickwynja/0f8374b423ae7aa00c69adf7fa984785 to your computer and use it in GitHub Desktop.
.command('sync', 'connect to peers and sync', async () => {
const ssb = require("./ssb");
const cooler = await ssb({ offline: true });
const { meta } = require("./models")({cooler});
await new Promise((r) => setTimeout(r, 1000));
console.log('syncing');
const done = await meta.sync();
process.exit()
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment