Code Monkey home page Code Monkey logo

community-fridge-ii's Introduction

Community fridge web application with MongoDB

This is my 4th course assignment of COMP 2406 Winter 22

It connects the Community fridge web application to a MongoDB database.

Upon server starts, all local JSON data is imported to a MongoDB database.

You may need to change username password dbname in config.js to point to your own database.

All subsequent queries are handled by the MongoDB database.

This web application supports the following database queries:

Request URL Content type Description
GET /fridges JSON Retrieving information for all fridges
GET /fridges/:fridgeID Retrieving data associated with a specific fridge
GET /search/items?type=TYPE&name=NAME Search for an item in the items collection with type = TYPE and name contains NAME
POST /itemsJSON Adding a new item into the items collection
PUT /fridges/:fridgeID Updating information about a fridge
POST /fridges/:fridgeID/items JSON Adding an item in the fridge
DELETE /fridges/:fridgeID/items/:itemID Deleting an item from a fridge
DELETE /fridges/:fridgeID/items?item=itemId1&item=itemId2 Delete itemId1 and itemId2 from fridgeID
DELETE /fridges/:fridgeID/items Delete all items from fridgeID

Setting up

npm install express mongodb mongoose

Start server

node server.js

Interact with this web appliaction

Send requests to http://localhost:8000/ with Postman

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.