Hyperdrive
API Docs | https://github.com/hypercore-protocol/hyperdrive |
Depends On | hypercore |
Hyperdrive is a secure, real-time distributed file system designed for easy P2P file sharing.
var hyperdrive = require('hyperdrive')
var drive = hyperdrive('./my-first-hyperdrive') // content will be stored in this folder
await drive.promises.writeFile('/hello.txt', 'world')
const list = await drive.promises.readdir('/')
console.log(list) // prints ['hello.txt']
const data = await drive.promises.readFile('/hello.txt', 'utf-8')
console.log(data) // prints 'world'