To start the server run
npm install
then
npm run start-server
🔹 Mongoose as your data modeling tool
Mongoose was used. Product scheme
🔹 Cloud-based MongoDB as your data store
All data is stored in a mongoDB Atlas Cloud Database
🔹 At least 3 endpoints to GET data from your server
GET localhost:5000/api/products
GET localhost:5000/api/product/<productId>
where <productId>
is the mongoDB '_id' value for the product you want to GET
GET localhost:5000/api/products/category/<productCategory>
where <productCategory>
is the value of the 'productCategory' key for objects you want to GET
(e.g., Wakeboards, Wakeboard%20Bindings, Life%20Jackets, Wakesurf%20Boards)
🔹 At least 1 endpoint allowing user to update an item via PUT or PATCH HTTP verbs
POST localhost:5000/api/edit-product
with the following in the request body:
productId: <productId String>
productCategory: <productCategory String>
title: <title String>
price: <price Number>
imageUrl: <imageUrl String>
description: <description String>
where <productId>
is the mongoDB '_id' for the product you want to edit
Replace all values surrounded by < > with the actual product values desired
🔹 At least 1 endpoint allowing user to create an item via POST
POST localhost:5000/api/add-product
with the following in the request body:
productCategory: <productCategory String>
title: <title String>
price: <price Number>
imageUrl: <imageUrl String>
description: <description String>
Replace all values surrounded by < >
with the actual product values desired
🔹 At least 1 endpoint allowing user to delete an item via DELETE
POST localhost:5000/api/delete-product
with the following in the request body:
productId: <productId String>
where <productId>
is the mongoDB '_id' for the product you want to edit
🔹 Your datastore will contain at least 25 items
A request to /api/products
will return data for 35 products
🔹 Your app will be deployed to production using some service like Heroku, Digital Ocean, etc.
Deployed to Heroku here: [https://abennett-crud-server.herokuapp.com]
🔹 All of your source code will be properly uploaded to GitHub
Source code hosted on Github here: [https://github.com/skaduusch/dgm4790-node-server]
🔹 Your ReadMe file will accurately describe the server install process (if any) and how to use the APIs
Here you are, at the end of the ReadMe.