https://github.com/kapetacom/sdk-nodejs-nosql-mongodb
https://github.com/kapetacom/sdk-nodejs-nosql-mongodb
nodejs-sdk
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kapetacom/sdk-nodejs-nosql-mongodb
- Owner: kapetacom
- License: mit
- Created: 2019-06-22T18:51:00.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-01T12:04:07.000Z (over 2 years ago)
- Last Synced: 2025-08-08T18:37:18.969Z (10 months ago)
- Topics: nodejs-sdk
- Language: TypeScript
- Size: 286 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# NodeJS Mongo support for the Kapeta project
Creates a client using Prisma and connects to a MongoDB database.
Is meant to be used with Kapeta and resources defined in a NodeJS Kapeta block.
Uses Prisma to make it simple to work with MongoDB from Kapeta - and
adds support for DB migrations.
Also exposes a CLI tool called ```kap-mongodb-url``` that can be used
to generate a Mongo database URL from within a Kapeta block - for a given environment.
To learn more about Kapeta, visit [kapeta.com](https://kapeta.com).
## Usage
This library exposes a class and function that can be used to create a client.
Normal usage is generated using Kapeta - but it can also be used directly.
### `createMongoDBClient`
Async function that creates a client using Prisma and connects to a MongoDB database
### `MongoDB`
Class that creates a client using Prisma and connects to a MongoDB database.
It will auto-initialize once the configuration provider is ready.