Skip to content

Very simple example of a RESTful API using MongoDB, Express, and Node.js to perform CRUD operations on the database.

Notifications You must be signed in to change notification settings

ricardoyamamoto/men-of-mean-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

#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

About

Very simple example of a RESTful API using MongoDB, Express, and Node.js to perform CRUD operations on the database.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published