Commit 08512a83e5b7de612b989c3f398132d015d1eecc
Share files on startup
Anders Rune Jensen committed on 4/23/2019, 9:23:51 PMParent: 15cfff0bc5163399a5e82ed1ac959e92d5c1fb12
Files changed
app/sync/initialise/dat.js | added |
app/sync/initialise/dat.js | |||
---|---|---|---|
@@ -1,0 +1,19 @@ | |||
1 … | +const nest = require('depnest') | ||
2 … | +const datSharedFiles = require('dat-shared-files/lib') | ||
3 … | + | ||
4 … | +exports.gives = nest('app.sync.initialise') | ||
5 … | + | ||
6 … | +exports.needs = nest({ | ||
7 … | + 'router.sync.router': 'first', | ||
8 … | + 'app.html.tabs': 'first' | ||
9 … | +}) | ||
10 … | + | ||
11 … | +exports.create = function (api) { | ||
12 … | + return nest('app.sync.initialise', datShare) | ||
13 … | + | ||
14 … | + function datShare () { | ||
15 … | + datSharedFiles.shareFiles(links => { | ||
16 … | + links.forEach(link => console.log('Sharing: ' + link)) | ||
17 … | + }) | ||
18 … | + } | ||
19 … | +} |
Built with git-ssb-web