Skip to content

michaelwclark/mongodb-atlas-data-api-sdk-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mongodb-atlas-data-api-sdk-examples

Examples of using mongodb-atlas-data-api-sdk

To run the examples update the environment variables accordingly. You can hardcode these too just update the src/env.js file.

To get these values please see here.

export API_KEY=<YOUR MONGO ATLAS DB API KEY>
export API_URL=<YOUR MONGO ATLAS DB API URL>
export DB_CLUSTER=<YOUR MONGO ATLAS CLUSTER NAME>
export DB_NAME=<YOUR MONGO ATLAS DB NAME>
export COLLECTION_NAME=<YOUR COLLECTION NAME>

Examples available:

> yarn findOne
> yarn find
> yarn insertOne
> yarn insertMany
> yarn updateOne
> yarn updateMany
> yarn replaceOne
> yarn deleteOne
> yarn deleteMany
> yarn aggregate

Note that the structure and IDs in the examples will likely not work for your db without modification, but hopefully will give you a starting point for using this SDK.

About

Examples of using mongodb-atlas-data-api-sdk

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published