- Encrypts files (by default)
- Modes: central-only, P2P-only (free), hybrid (default)
- Backed by MaxCDN
- 100% open source client and server
- Useful for "serverless websites" (i.e. no backend)
- Simple API (compare to Amazon S3, CloudFront, requires server-side?)
- Cheap
- Using a trustless server to add availability to a P2P app
- 100% of profits will go to the development of WebTorrent and WebTorrent Desktop
npm install peerdb
It's super easy to store data:
var db = require('peerdb')
db.put(Buffer('some data'), function (err, key) {
// `key` is a unique identifier based on the data (content-addressed)
db.get(key, function (err, value) {
console.log(value) // 'some data'
})
})
To ensure that data remains accessible when no peers are online, store it on a centralized content delivery network (CDN):
var db = require('peerdb')
db.setup({
apiKey: '...'
})
db.put(Buffer('some data'), function (err, key) {
// `key` is a unique identifier based on the data (content-addressed)
db.get(key, function (err, value) {
console.log(value) // 'some data'
// Data can be deleted from the central server and the local database
db.del(key, function (err) {
// Data is deleted!
})
})
})
TODO
MIT. Copyright (c) WebTorrent, LLC.