# rongo

> Rongo - a mongo db wrapper

Latest version **0.0.6** (published 2019-03-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install rongo
pnpm add rongo
yarn add rongo
bun add rongo
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2019-03-03 |
| First published | 2018-10-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ristika |
| Maintainers | cortogo |

## Links

- npm: https://www.npmjs.com/package/rongo
- Repository: https://github.com/ristika/rongo
- Issues: https://github.com/ristika/rongo
- npm.io page: https://npm.io/package/rongo

## Dependencies (1)

- [mongodb](https://npm.io/package/mongodb.md) ^3.0.1

## Recent versions

- 0.0.6 (latest) — 2019-03-03
- 0.0.5 — 2019-03-03
- 0.0.4 — 2019-03-03
- 0.0.3 — 2018-10-06
- 0.0.2 — 2018-10-03
- 0.0.1 — 2018-10-03

## README

# Rongo

https://github.com/ristika/rongo

https://www.npmjs.com/package/rongo

## A simple wrapper with limited (but most of what you might need) for the official MongoDB Node.js driver

Ideal for replica sets and allowing the client to manage and persist connections rather than creating one on each call.

For information on using the mongo with express see: https://www.ristika.com/search?keyword=express;mongo.

To use:

---

-   Import the package via npm - var rongo = require('rongo');

-   Set your global DBAddresses object:

```
global.DBAddresses = {
	read: 'localhost:27017/' + dbName,
	write: 'localhost:27017/' + dbName
};

or

global.DBAddresses = {
	read: 'replica0:27017/' + dbName,
	write: 'replica1:27017/' + dbName
};
```

-   Call rongo.setUpDBs('dbname');

-   Rongo can now be passed around and used in places like:

`rongo.collection('acoll').find({ name: name }, (err, docs) => callbackFunc);`

To do:

---

-   Return promises rather than using callbacks

-   Add a util function to determine a write address

-   Manage state within rongo, updating the dbs etc

-   Add linting

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