mekanika-adapter-mongo

Query envelope adapter for MongoDB

Usage no npm install needed!

<script type="module">
  import mekanikaAdapterMongo from 'https://cdn.skypack.dev/mekanika-adapter-mongo';
</script>

README

adapter-mongo

WIP. Do not use

Query envelope adapter for MongoDB

Usage

Require the adapter:

var adapter = require('mekanika-adapter-mongo');

Then specify your MongoDB config:

adapter.config.host = '127.0.0.1';
adapter.config.port = '27017';
adapter.config.db = 'test';

And pass Query envelopes to the .exec(qe, cb) method:

adapter.exec({do:'find',on:'users'}, myCallback );

The function myCallback will be passed (error, results) as parameters on completion of the adapter execution. In the case of no errors, error will equal null.

Tests

To run the tests:

npm test

To lint the code:

npm run lint

To generate coverage reports:

npm run coverage

License

Copyright 2013-2015 Mekanika

Released under the MIT License (MIT)