Giter VIP home page Giter VIP logo

exercise_w05d04_node_mongo's Introduction

Using Mongo in Node

Research questions - To the docs!

How do you add MongoDB to a Node project?

How do you connect to MongoDB through Node?

Do you still need to run a MongoDB server?

If we were to build an Express app that persists data, where would we use the MongoDB Node client?

If we asked an express server to return all the the objects in a mongoDB database

  • What might the request from the Browser look like?
  • What mongoDB method might we use on the server?

If we asked an express server to find an object by its ID and update some of it's date

  • What might the request from the Browser look like?
  • What mongoDB method might we use on the server?

Can you?

  • Install the MongoDB node module

  • require the module inside app.js

  • Inside app.js - connect to a mongoDB

  • Insert your name and age into a collection

  • Run the script and check via the mongo shell that it worked

  • Can you update your age

  • Run the script and check via the mongo shell that it worked

  • Can you find the document with your name as a criteria

  • Run the script and check via the mongo shell that it worked

  • Can you delete the document

  • Run the script and check via the mongo shell that it worked

  • MongoDB driver for Node

  • MongoClient

exercise_w05d04_node_mongo's People

Contributors

boshika 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.