easy-mongo-fixture
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "easy-mongo-fixture", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
easy-mongo-fixture | ||
================== | ||
Mongo fixture manager for [easy-fixture](https://github.com/ivpusic/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** |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23446
33