Skip to content

Keyin-Fullstack-and-Databases/keyin-db-mongodb-nodejs

Repository files navigation

MongoDB and Node.js Examples

This folder contains examples of applications that demonstrate how to interact with a MongoDB database using Node.js. These examples showcase different use cases, such as managing items, handling library book records, managing product inventory, and more.

Examples

1. Item Manager

  • Description: A Node.js application that allows users to manage a list of items stored in a MongoDB database. Users can add, view, update, and delete items.
  • How to Run:
    1. Navigate to the item-manager folder.
    2. Install dependencies:
      npm install
    3. Start the application:
      node index.js
    4. Use the CLI or API endpoints to interact with the database.

2. Library Book Management

  • Description: A Node.js application that manages library book records in a MongoDB database. Users can add, view, update, and delete book records.
  • How to Run:
    1. Navigate to the library-book-management folder.
    2. Install dependencies:
      npm install
    3. Start the application:
      node index.js
    4. Use the CLI or API endpoints to manage library book records.

3. Product Inventory

  • Description: A Node.js application that allows users to manage product inventory stored in a MongoDB database. Users can add, view, update, and delete product records.
  • How to Run:
    1. Navigate to the product-inventory folder.
    2. Install dependencies:
      npm install
    3. Start the application:
      node index.js
    4. Use the CLI or API endpoints to manage product inventory.

4. To-Do List Manager

  • Description: A Node.js application that allows users to manage a to-do list stored in a MongoDB database. Users can add tasks, mark them as complete, and delete tasks.
  • How to Run:
    1. Navigate to the todo-list-manager folder.
    2. Install dependencies:
      npm install
    3. Start the application:
      node index.js
    4. Use the CLI or API endpoints to manage your to-do list.

5. User Management

  • Description: A Node.js application that allows users to manage user accounts stored in a MongoDB database. Users can add, view, update, and delete user records.
  • How to Run:
    1. Navigate to the user-management folder.
    2. Install dependencies:
      npm install
    3. Start the application:
      node index.js
    4. Use the CLI or API endpoints to manage user accounts.

Prerequisites

  • Node.js installed on your machine.
  • A running MongoDB database instance.
  • Update the database connection settings in each app's index.js file to match your MongoDB configuration.

Notes

  • These examples use the mongodb library to interact with MongoDB.
  • Ensure your MongoDB database is running and accessible before starting the applications.
  • Example data or schemas may be included in the respective folders.

About

Base examples for 10-mongodb-nodejs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published