Skip to content

Latest commit

 

History

History
92 lines (71 loc) · 2.5 KB

README.md

File metadata and controls

92 lines (71 loc) · 2.5 KB

Pet-Logger

Keep track of your pets and their activities!

Scratch Project Team:

Iteration Project Team:

Installation

Clone repo (dev = development, main = production)

npm install

Run the dev server:

npm run dev

Build bundle.js

npm run build

Run production:

npm start

Resources

Original Project Brief

Excalidraw - High level Mongo Shema, and UI frameworks. Note: Excalidraw shared files do not retain history, so be careful!

Scrum Board.

#gobin-shark-scratch-project slack channel

Iteration Project Brief

Routes

Almost all requests defined in server/routers/petLoggerRouter.js and server/controllers/petLogger/Controller.js, so check there for source of truth.

POST request to add new dog

Method: POST
Endpoint: localhost:3000/api/dog
Body: { name, breed, age, gender }
Controller Method: addDog
Return: newDog object

GET dogs of user

METHOD: GET
Endpoint: localhost:3000/api/dog/:user
Controller method: getDogs
Response: array of matching dog objects

GET for all posts of dog

Method: GET
Endpoint: localhost:3000/api/post (query dogId)
Controller mtehod: getPost
Response: array of post objects [{postType, details, date}]

POST for new activity to dog

Method: POST
Endpoint: localhost:3000/api/post
Body: { dogID, postType, details } 
controller Method: addPost
Response: New Post object

Database

MongoDB backend is associated with trialnerr's account. IP Address allowlists will need to be explicitly indicated in order to read/write.