package
Manage multiple dat instances on a single machine.
npm install dat-managerGitHub-flavored package documentation.
Across all versions, last 30 days.
141 in 30 days
Runtime metadata.
Manages all of your dats on a single machine.
var manager = Manager(opts)Creates a new manager instance. Any saved dats that are marked as 'active' will automatically join their swarm and start sharing data unless start is false.
location: the location on the local filesystem to store the data. defaults to path.resolve('dats')db: the levelup database instance for the manager.datdb: the levelup database instance for dat.start: default to trueManager.share(key, location, cb)Will create a dat link and share the given local filesystem location. It also joins the dat swarm and begins sharing it.
Calls the callback with cb(err, dat)
Manager.start(key, opts, cb)Starts sharing a dat with the given key. If the dat doesn't exist with that key, it creates a new one and begins downloading it.
link: the link to use. If not provided, will use the one that is stored.location: the location to store the data.Manager.stop(key, cb)Stops sharing the dat on the swarm.
Manager.get(cb)Get the metadata for the dat.
Manager.listList all dats and their metadata.
Manager.deleteDeletes a dat from the system. If currently sharing the dat, will stop sharing it.
Manager.closeCloses all of the swarm and database connections.
Estimated unpacked size across 64 packages.
9.8 MB+
Includes dependencies.
13.3.4
^1.0.1
2.0.0
^2.6.0
2.6.0
^3.0.4
5.1.1
^1.1.2
1.2.3
^1.1.4
1.2.0
^2.1.1
3.2.0
^1.1.2
1.1.3
^1.1.1
1.2.1
^3.0.1
6.1.0