This project explores the use of a NoSQL database using Mongoose. This application demonstrates basic functionality for a simple social network whilst handling large amounts of unstructured data. This application allows CRUD functions to be applied to users, friends, thoughts(similar to user posts), and reactions on a particular user's thoughts.
Links:
npm i
Ensure that you have an API client installed such as insomnia or postman. Clone this repo, start the server using npm start
, and use the following routes to try out the application:
User routes
- GET all users
localhost:3001/api/users
- GET user by Id
localhost:3001/api/users/:userId
- POST user
localhost:3001/api/users
- PUT user
localhost:3001/api/users/:userId
- DELETE
localhost:3001/api/users/:userId
Thought routes
- GET all thoughts
localhost:3001/api/thoughts
- GET thought by Id
localhost:3001/api/thoughts/:userId
- POST thought
localhost:3001/api/thoughts
- PUT thought
localhost:3001/api/thoughts/:thoughtId
- DELETE
localhost:3001/api/thoughts/:thoughtId
Reaction routes
- POST reaction
localhost:3001/api/:thoughtId/reactions
- DELETE reaction
localhost:3001/api/:thoughtId/reactions/:reactionId
Friend routes
- POST('add') friend
localhost:3001/api/:id/friends/:friendId
- DELETE friend
localhost:3001/api/:id/friends/:friendId
This project is licensed under MIT
No contributions at the moment
N/A
If you have any questions about the repo, please contact me at j.taylor1343@gmail.com.
You can find more of my work and projects at johannt91.
Creating a user using post method