Skip to content

Latest commit

 

History

History
62 lines (31 loc) · 1.02 KB

README.md

File metadata and controls

62 lines (31 loc) · 1.02 KB

#CRUD Operations with MongoDB, Express and Node.js

  1. Install MongoDB

    https://docs.mongodb.com/manual/administration/install-community/

  2. Install Node

    https://nodejs.org/en/

  3. Install Express

    In the same directory as the server.js file, run this on command prompt:

    npm install express

  4. Install Body-Parser

    In the same directory as the server.js file, run this on command prompt:

    npm install body-parser

  5. Install Mongoose

    In the same directory as the server.js file, run this on command prompt:

    npm install mongoose

  6. Install Postman extension on Chrome

  7. Run MongoDB

    In the prompt command, run:

    mongod

  8. Run the server application

    In the same directory as the server.js file, run this on command prompt:

    node server

  9. To test, run the following methods on Postman

    GET

    PUT

    POST

    DELETE

    The URL can be:

    http://localhost:3000/user/

    or:

    http://localhost:3000/user/:id

    :id = id of the user you want to select, update or delete