amiteshrai / mongo-refresher

A refresher on the concepts of MongoDB database using Python programming

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mongo Refresher

A refresher on the fundamental concepts of the MongoDB database using Python programming.

Python Environment Setup

Installing MongoDB

Using Docker

For installation of MongoDB, I am using the official Docker image.

Attach a volume for persistent storage

mkdir -p data

Start a container with network mapping

docker container run -d --name mongodb --net="host" -v /Users/fintech/Workspaces/Personal/Code/mongo-refresher/data/db:/data/db mongo

Check if the container is running

docker container ls

Run commands in the container

docker exec -t mongodb bash

Using Homebrew

Installing MongoDB and MongoDB Compass

xcode-select --install
brew tap mongodb/brew
brew install mongodb-community@5.0
brew install --cask mongodb-compass

Add PATH

echo 'export PATH="/opt/homebrew/opt/mongodb-community@5.0/bin:$PATH"' >> ~/.zshrc

Start MongoDB

mongod --dbpath=/Users/fintech/Workspaces/Personal/Code/mongo-refresher/data/db

About

A refresher on the concepts of MongoDB database using Python programming


Languages

Language:Python 100.0%