An HTTP transport/storage provider for Dat, allowing replication of Dats over normal HTTP connections from flat files on the server. Currently only supports read operations, write operations coming in the future (open an issue if you need this).
.dat folder must be available on the server for this to work. Point this at the root url where the
.dat folder is and you can use this to do replication.
This is implemented as a storage provider, conforming to the https://www.npmjs.com/package/abstract-random-access API. That may seem counterintuitive, as this provides a networkworking transport but implements a storage provider API. However, in Dat you can wrap a storage provider in a Hyperdrive instance to turn it into a network transport.
var hyperdrive =var Dat =var datHttp =// httpDrive is a drive that 'wraps' the http storage provider in a hyperdrive instance. It won't write any data to disk, in fact we won't be using it to write anything, only to read things.var storage =var httpDrive =httpDrive