https://github.com/framingeinstein/node-mongo-provider
A Simple MongoDB Node.JS wrapper
https://github.com/framingeinstein/node-mongo-provider
Last synced: 3 months ago
JSON representation
A Simple MongoDB Node.JS wrapper
- Host: GitHub
- URL: https://github.com/framingeinstein/node-mongo-provider
- Owner: framingeinstein
- License: mit
- Created: 2012-11-15T18:58:59.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-01-08T19:57:06.000Z (over 13 years ago)
- Last Synced: 2025-10-04T19:34:21.464Z (9 months ago)
- Language: JavaScript
- Homepage: https://npmjs.org/package/mongo-provider
- Size: 148 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
mongo-provider - A simple wrapper for mongodb driver for NodeJS
====================
[](http://travis-ci.org/framingeinstein/node-mongo-provider)
Installation
------------
You can install this through npm: npm install mongo-provider
You can also install via git by cloning: `git clone https://github.com/framingeinstein/node-mongo-provider.git /path/to/mongo-provider`
Usage
-----
var MongoProvider = require('mongo-provider').MongoProvider;
var myCollectionProvider = new MongoProvider('server', port, 'MyDatabase', 'MyCollection');
provider.on("open", function (err, client) {
// Do something with client
…
// Don't forget to destroy the provider to cleanup and close the connection
provider.destroy(function (err, client) {
//Do something when destroyed
});
});