easy-mongo-fixture

1.0.7 • Public • Published

easy-mongo-fixture

Build Status

Mongo fixture manager for easy-fixture lib.

Example

var fixture = require('easy-fixture');
var MongoFixture = require('easy-mongo-fixture');

// init MongoFixture middleware
var mongoFixture = new MongoFixture({
  database: 'test',
  collections: ['products', 'categories'],
  dir: 'fixture',
  override: true
});

// set middleware to use
fixture.use(mongoFixture);

// collect data from mongo database and save it to local file(s)
fixture.save();

// when we need to load fixture, call this method to read from fixture file,
// and to import wanted data
fixture.load();

License

MIT

/easy-mongo-fixture/

    Package Sidebar

    Install

    npm i easy-mongo-fixture

    Weekly Downloads

    5

    Version

    1.0.7

    License

    MIT

    Last publish

    Collaborators

    • ivpusic