Permalink
Browse files

add missing code to make the daemon work

  • Loading branch information...
karissa committed Apr 6, 2016
1 parent 52efefb commit c9501c7965eab076d25d94258e865cd2dd5ee432
Showing with 10 additions and 1 deletion.
  1. +10 −1 server.js
View
@@ -3,8 +3,17 @@ var dat = require('.')()
module.exports = function (server, stream) {
return {
join: function (id, cb) {
var archive = dat.drive.get(id, '.')
dat.join(id)
console.log('join', id)
var stream = archive.createEntryStream()
stream.resume()
stream.on('data', function (data) {
console.log('got item', data)
archive.download(data, function (err) {
if (err) throw err
console.log('downloaded')
})
})
cb()
},
leave: function (id, cb) {

0 comments on commit c9501c7

Please sign in to comment.