RiverTavis / rivers-final

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setup

Open a terminal and change directory to server by typing cd server, then run yarn install to install dependencies. Run yarn dev to start the server, then cd to client and run yarn start.

Endpoints & Where They're Used

GET api/users

This endpoint retrieves a data set of all users registered with the app, it is used in the SignInPage.js, DiscoverPage.js & Swipe.js components

GET api/signs

This endpoint retrieves every astrological sign and a summary of their general compatability with every other sign, it is used in the ChatPage.js component to give each user an idea of their astrological compatability with each of their matches

GET api/users/:id

This endpoint retrieves a single user dynamically based on their id, it is used in the ChatPage.js component to fetch the information about each individual match

POST api/users/new

This endpoint creates a new user in the SignUpPage.js component when registering

PATCH api/user/likes/:id

This endpoint updates the data array of the signed in users likes in the Swipe.js component each time they swipe right on another users profile

PATCH api/user/matches/:id

This endpoint updates the data array of matches in the Swipe.js every time 2 users have both liked each other, this data is used in the Matches.js component

PATCH /users/messages/update

This endpoint updates the messages sent by each party of a chat and patches it to both user's data arrays, it is used in the ChatPage.js component

DELETE api/users/edit/remove/:id

This endpoint deletes a user dynamically based on their id. I only added it for the sake of having a fully functional back end CRUD app but this endpoint is not used in the front end

About


Languages

Language:JavaScript 65.1%Language:HTML 34.9%