Giter Site home page Giter Site logo

boilerplate-mongomongoose's Introduction

MongoDB and Mongoose Challenges - FreeCodeCamp Solution

This repository contains my solution to the MongoDB and Mongoose challenges as part of the FreeCodeCamp curriculum. It's designed to help you understand the intricacies of database operations using MongoDB and the Mongoose library.

Getting Started

Prerequisites

  • Node.js and npm installed on your machine.
  • A MongoDB Atlas account or local MongoDB setup.

Setup

After cloning this repository, install the required dependencies:

npm install

Create a .env file in the root of the project. Populate it with your MongoDB connection details:

MONGO_USERNAME=your_username
MONGO_PASSWORD=your_password
CLUSTER=your_cluster_name

Note: Make sure to replace your_username, your_password, and your_cluster_name with your actual MongoDB Atlas credentials.

Start the server:

npm start

Endpoints

Here are some of the primary endpoints you can explore:

  • GET /: Main endpoint that serves the index page.
  • GET /_api/create-and-save-person: Creates and saves a new person record in the database.
  • POST /_api/create-many-people: Creates and saves multiple person records in the database.
  • POST /_api/find-all-by-name: Finds all people by a specific name.
  • POST /_api/find-one-by-food: Finds a person by their favorite food.
  • GET /_api/find-by-id: Finds a person by their unique ID.
  • POST /_api/find-edit-save: Finds a person by ID, edits their data, then saves the updated record.
  • POST /_api/find-one-update: Finds a person by name and updates their age.
  • POST /_api/remove-one-person: Removes one person by their ID.
  • POST /_api/remove-many-people: Removes all people who match a given name.
  • POST /_api/query-tools: Demonstrates a chained search query tool.

Each endpoint serves a specific function in the database, whether it's creating, reading, updating, or deleting records.

boilerplate-mongomongoose's People

Contributors

amasad avatar em-ant avatar huyenltnguyen avatar jeremies avatar josephlivengood avatar lasjorg avatar mot01 avatar naomi-lgbt avatar prince-mendiratta avatar randelldawson avatar shaunshamilton avatar totallycurious avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.