Notice: Development on this repo is deprecated as we continue our v3 rearchitecture. Please see https://github.com/storj/storj for ongoing v3 development.
Common storage models for various Storj services
npm install storj-service-storage-models --save
var Storage = require('storj-service-storage-models');
var db = new Storage(
'mongodb://127.0.0.1:27017/storj-bridge-database-name',
{
auth: {
user: 'myuser',
pass: 'mypassword'
},
mongos: {
ssl: true
}
},
{
logger: myAwesomeLogger
});
db.models.User.findOne({ email: '[email protected]' }, function(err, user) {
if (err) {
console.error(err.message);
} else {
console.info(user);
}
});
You'll have to set Coinpayments environment variables CP_PUBLIC_KEY
and CP_SECRET_KEY
in order to get coinpayments client working with the payment processor adapter.
If using billing functionality, be sure to include your own .env
file with necessary environment variables.