# mongodb-fixtures

> JSON based fixtures for mongodb

Latest version **0.0.5** (published 2011-10-31) · 0 weekly downloads

## Install

```sh
npm install mongodb-fixtures
pnpm add mongodb-fixtures
yarn add mongodb-fixtures
bun add mongodb-fixtures
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2011-10-31 |
| First published | 2011-10-16 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 39 |
| Author | Tom de Grunt |
| Maintainers | tdegrunt |
| Keywords | mongodb, mongo, json, fixtures |

## Links

- npm: https://www.npmjs.com/package/mongodb-fixtures
- Repository: https://github.com/tdegrunt/mongodb-fixtures
- npm.io page: https://npm.io/package/mongodb-fixtures

## Dependencies (4)

- [eco](https://npm.io/package/eco.md) >= 1.1.0-rc-1
- [lingo](https://npm.io/package/lingo.md) >= 0.0.4
- [mongodb](https://npm.io/package/mongodb.md) >= 0.9.6
- [underscore](https://npm.io/package/underscore.md) >= 1.2.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.0.5 (latest) — 2011-10-31
- 0.0.4 — 2011-10-26
- 0.0.3 — 2011-10-26
- 0.0.2 — 2011-10-17
- 0.0.1 — 2011-10-16

## README

mongodb-fixtures
----------------

Easy fixtures for mongodb:

1) Put a fixtures folder in your project

2) Put JSON files in the fixtures folder, with the filenames being the collection-names (plural)

3) Create code similar to:

    var fixtures = require('mongodb-fixtures');

    var Db = require('mongodb').Db,
      Connection = require('mongodb').Connection,
      Server = require('mongodb').Server;

    var db = new Db('wines', new Server("localhost", Connection.DEFAULT_PORT, {}));

    fixtures.load();
    fixtures.save(db, function() {
      db.close();
      console.dir(fixtures);
    });

---
_Source: https://npm.io/package/mongodb-fixtures · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
