Files: 55335207126eb15c3a0f1834ffb8bbcbd32658a8 / app / sync / initialise / dat.js
470 bytesRaw
1 | const nest = require('depnest') |
2 | const datSharedFiles = require('dat-shared-files') |
3 | |
4 | exports.gives = nest('app.sync.initialise') |
5 | |
6 | exports.create = function (api) { |
7 | return nest('app.sync.initialise', datShare) |
8 | |
9 | function datShare () { |
10 | if (process.env.DAT === 'false') return |
11 | |
12 | datSharedFiles.shareAll((err, links) => { |
13 | if (err) { |
14 | console.error(err) |
15 | |
16 | return |
17 | } |
18 | |
19 | links.forEach(link => console.log('Sharing: ' + link)) |
20 | }) |
21 | } |
22 | } |
23 |
Built with git-ssb-web