Coder Social home page Coder Social logo

mongo-hamburgers's Introduction

Mongo-Hamburgers

Get Started start mongo server

in terminal type brew services start [email protected] Note - to stop : brew services stop [email protected] start a mongo shell

when mongo is running, open a new tab in terminal and type mongosh your prompt should now be a > Note - to stop : type exit show dbs to show your databases

db show which database is in use (default is usually test)

use burgers to switch to a database named burgers, if there is no database burgers it will create and switch into it

expected output switched to db burgers db.createCollection('burger') to create a burger collection

Expected output: { "ok": 1 } show collections - to show collections

Expected output burgers โ†’ 0.000MB / 0.004MB Let's make a burger document together

db.burger.insert( { meat: 'beef', cheese: false, toppings: ['ketchup' ,'onions' ,'pickles'] } ) Expected output: WriteResult({ "nInserted": 1 }) Let's query for all the burgers, since we just made one burger, it should just show one burger db.burger.find() Expected output: { "_id": ObjectId("5a18c6e82737dc8b317a46dc"), "meat": "beef", "cheese": false, "toppings": [ "ketchup", "onions", "pickles" ] } Fetched 1 record(s) in 2ms let's make one more burger exactly like the one we just made (copy paste again) Follow the rest of the prompts in answers.js

mongo-hamburgers's People

Contributors

chrisdotgrubb avatar

Watchers

 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.