Browse Source

expose swarm function

ameba23 3 years ago
parent
commit
3634df04fe
2 changed files with 3 additions and 1 deletions
  1. 2
    0
      index.js
  2. 1
    1
      swarm.js

+ 2
- 0
index.js View File

@@ -1,4 +1,6 @@
1 1
 const KappaDrive = require('peerfs')
2
+// const peerfsMount = require('./node_modules/peerfs/mount')
3
+const swarm = require('./swarm')
2 4
 const peerfsMount = require('./mount')
3 5
 const ram = require('random-access-memory')
4 6
 const MOUNTDIR = './mnt'

+ 1
- 1
swarm.js View File

@@ -3,7 +3,7 @@ const pump = require('pump')
3 3
 const config = require('dat-swarm-defaults')
4 4
 const debug = require('debug')('kappa-drive')
5 5
 
6
-function swarm (drive, opts = {}) {
6
+module.exports = function (drive, opts = {}) {
7 7
   // TODO: add id property with local key  (cabal does this)
8 8
   var swarm = discovery(config())
9 9