/service-storage-models

Common storage models for various Storj services.

Primary LanguageJavaScriptGNU Lesser General Public License v3.0LGPL-3.0

Storj Service Storage Models

Build Status Coverage Status GitHub license

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: 'gordon@storj.io' }, function(err, user) {
  if (err) {
    console.error(err.message);
  } else {
    console.info(user);
  }
});

Billing Specific

If using billing functionality, be sure to include your own .env file with necessary environment variables.