This application is the backend for the social network web application where users can share their thoughts, add friends, and react to each others' thoughts.
The application does require dependencies, so enter this code (below) into the terminal and run it.
npm i
(Optional) Download Insomnia for backend functionality testing.
To make API call, type the following into your url after your port number:
GET
/api/users - finds all usersGET
/api/users/:userId - finds a single user by their IDPOST
/api/users - creates a user (include username and email)PUT
/api/users/:userId - updates a user's username or emailDELETE
/api/users/:userId - deletes a user and their associated thoughts by id
POST
/api/users/:userId/friends/:friendId - user adds that friendDELETE
/api/users/:userId/friends/:friendId - user deletes that friend
GET
/api/thoughts - finds all thoughtsGET
/api/thoughts/:thoughtId - finds a single thought by their IDPOST
/api/thoughts - creates a new thought (include thoughtText, user's ID, and user's username)PUT
/api/thoughts/:thoughtId - updates a new thought (thoughtText)DELETE
/api/thoughts/:thoughtId - deletes a thought by ID
POST
/api/thoughts/:thoughtId/reactions - creates a reaction on the thoughtDELETE
/api/thoughts/:thoughtId/reactions/:reactionId - deletes a reaction on the thought
A video is provided to demonstrate the functionality of the Social Media API.
No contributions needed.
If you have any questions and want to reach me, email me at christylex3@gmail.com. Also, you can check out my other work here.