Notice: Development on this repository is currently on pause during our v3 rearchitecture. Please see storj/storj for ongoing v3 development.
A storj-lib compatible storage adapter for MongoDB, primarily used by storj-bridge.
- MongoDB
- Storj Core
npm install storj-mongodb-adapter --save
var storj = require('storj-lib');
var MongoStorageAdapter = require('storj-mongo-adapter');
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/dbname', function() {
var adapter = new MongoStorageAdapter(mongoose);
var manager = new storj.StorageManager(adapter);
var renter = new storj.RenterInterface({
storageManager: manager,
// ...
});
// That's it! The `renter` object now uses MongoDB to store
// contract data!
});This software is licensed under the terms of the GNU Lesser General Public License, version 3 or later.