founders-programme-2 / business-launchpad

An app to facilitate young entrepreneurs in growing their business ventures.
1 stars 1 forks source link

Set up MongoDB #51

Closed Oliversw closed 5 years ago

Oliversw commented 5 years ago

Ideally with a test database as well

relates to #18

teenie-quaggard commented 5 years ago

@founders-programme-2/business-launchpad

Some basic set up that you'll need to do to use MongoDb:

What's MongoDB?

A record in MongoDB is a document, which is a data structure composed of field and value pairs. MongoDB documents are similar to JSON objects. The values of fields may include other documents, arrays, and arrays of documents.

Install

https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/

Mac

https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/

If you already have Homebrew installed:

brew tap mongodb/brew

Install MongoDb:

brew install mongodb-community@4.0

To run MongdoDb:

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

OR

brew services start mongodb-community@4.0

Connect and use MongoDB

Run in a new terminal window mongo

What's Compass?

Download: https://www.mongodb.com/download-center/compass?jmp=hero

What's Mongoose?

Mongoose is an Object modeling tool for MongoDB.

Mongoose is built on top of the MongoDB driver to provide programmers with a way to model their data.

It manages relationships between data, provides schema validation, and is used to translate between objects in code and the representation of those objects in MongoDB.

It will be included in the package.json