-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6ad03d8
commit df0b14e
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# mongo-wrapper | ||
|
||
## Description | ||
|
||
This repository contains a node/TS wrapper which simplifies the process of communication with Mongo. | ||
|
||
## How do I Use It? | ||
|
||
Install a specific or the latest release in your `package.json` dependencies: | ||
|
||
```json | ||
"@quizizz/mongo": "github:quizizz/mongo-wrapper#v0.2.2" | ||
``` | ||
|
||
Import and use in your code as follows: | ||
|
||
```js | ||
import Mongo from "@quizizz/mongo"; | ||
|
||
const eventEmitter = new EventEmitter(); | ||
const config = {...}; | ||
|
||
const mongoClient = MongoFactoryAuto("mongo", eventEmitter, config); | ||
``` | ||
|
||
## How do I contribute? | ||
|
||
We work based on releases. Steps: | ||
|
||
- Branch out from `main` | ||
- Label the branch accordingly - `chore/...`, `feat/...`, `fix/...` | ||
- Make a PR to `main` once done & tested | ||
- Once approved and merged, create a new release from the `main` branch following the SEMVER approach to versioning |