📚 A repository to learn CosmosDB with NodeJS
This repository is a starting point to learn how to integrate Azure CosmosDB, Microsoft's globally distributed, multi-model database service, using NodeJS. Explore how to perform CRUD operations and leverage CosmosDB’s features with a simple and practical implementation.
- Azure CosmosDB: Learn how to interact with CosmosDB for storing and retrieving data.
- NodeJS Integration: Understand the usage of CosmosDB's NodeJS SDK.
- CRUD Operations: Practical examples of Create, Read, Update, and Delete operations.
- Globally Distributed Database: Learn how CosmosDB simplifies data replication and consistency across the globe.
Before getting started, ensure you have the following:
- Azure Subscription: Create a free Azure account at azure.microsoft.com.
- CosmosDB Instance: Set up a CosmosDB account through the Azure portal or CLI.
- Node.js: Install the latest stable version from nodejs.org.
- Azure CosmosDB SDK for NodeJS: Installed automatically via the project dependencies.
-
Clone this repository:
git clone https://github.com/GuilhermeStracini/hello-world-cosmosdb-nodejs.git cd hello-world-cosmosdb-nodejs
-
Install the dependencies:
npm install
-
Set up your CosmosDB credentials:
- Copy
.env.example
to.env
. - Add your CosmosDB URI, Primary Key, and Database Name.
- Copy
-
Run the application:
npm start
-
Follow the console output to explore how the application interacts with CosmosDB.
This repository is licensed under the MIT License.
Contributions are welcome! Feel free to open issues or submit pull requests to enhance this project.