hello-world-cosmosdb-nodejs

Hello World CosmosDB NodeJS

📚 A repository to learn CosmosDB with NodeJS

wakatime Maintainability Test Coverage CodeFactor GitHub license GitHub last commit Codacy Badge


About

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.


Features


Prerequisites

Before getting started, ensure you have the following:

  1. Azure Subscription: Create a free Azure account at azure.microsoft.com.
  2. CosmosDB Instance: Set up a CosmosDB account through the Azure portal or CLI.
  3. Node.js: Install the latest stable version from nodejs.org.
  4. Azure CosmosDB SDK for NodeJS: Installed automatically via the project dependencies.

Getting Started

  1. Clone this repository:

    git clone https://github.com/GuilhermeStracini/hello-world-cosmosdb-nodejs.git
    cd hello-world-cosmosdb-nodejs
    
  2. Install the dependencies:

    npm install
    
  3. Set up your CosmosDB credentials:
    • Copy .env.example to .env.
    • Add your CosmosDB URI, Primary Key, and Database Name.
  4. Run the application:

    npm start
    
  5. Follow the console output to explore how the application interacts with CosmosDB.


License

This repository is licensed under the MIT License.


Contributing

Contributions are welcome! Feel free to open issues or submit pull requests to enhance this project.