Skip to content

Instantly share code, notes, and snippets.

@harrisonmalone
Created July 2, 2020 05:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save harrisonmalone/9ca72dabe27d4d00659f438e49da2f0f to your computer and use it in GitHub Desktop.
Save harrisonmalone/9ca72dabe27d4d00659f438e49da2f0f to your computer and use it in GitHub Desktop.

MongDB

Just like Postgres before we can start using MongoDB we need to install it on our machines and have it running.

MacOS using Hombrew

brew update
brew install mongodb

Ubuntu Download

Start MongoDB by running

//homebrew users
mongod --config /usr/local/etc/mongod.conf

//ubuntu
mongod

//If there was permissions error when just running mongod make sure that there is a directory /data/db and that directory has permission to read & write for the current user

Ok now that the mongo database is running we can fire up the MongoDB shell by by opening a new tab in our terminal and running this command.

mongo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment