- Description
- User Story
- Acceptance Criteria
- Video Link
- Installation
- Technologies
- Usage
- Gif Demo
- License
- Contributing
- Questions
- An application that used mongoose and mongoDB backend for an Social-Network site.
- AS A social media startup
- I WANT an API for my social network that uses a NoSQL database
- SO THAT my website can handle large amounts of unstructured data
- GIVEN a social network API
- WHEN I enter the command to invoke the application
- THEN my server is started and the Mongoose models are synced to the MongoDB database
- WHEN I open API GET routes in Insomnia for users and thoughts
- THEN the data for each of these routes is displayed in a formatted JSON
- WHEN I test API POST, PUT, and DELETE routes in Insomnia
- THEN I am able to successfully create, update, and delete users and thoughts in my database
- WHEN I test API POST and DELETE routes in Insomnia
- THEN I am able to successfully create and delete reactions to thoughts and add and remove friends to a user’s friend list
- Clone the repo and use command
npm install
to install all require packages. - Require Insomnia to test the API ability.
- Input command npm start to start up the server. It will also created a database in mongoDB under the name
socialDB
.
-
When API GET routes for users and thoughts are opened in Insomnia, the data for each of the routes is displayed in formatted JSON.
-
User, Friend, Thought, and Reaction routes are created to create the database and test the API on Insomnia.
-
User Routes
- To use
Get, get by ID, create User, update User, and Delete User
, please follow the instruction from the Demo.
- Friend Routes - a user can add a friend and delete a friend.
- To use
add a friend or remove a friend
, please follow the instruction from the Demo.
- Thought Routes - a user can create a thought, get all thoughts or a single thought by ID, update a thought by ID, and delete a thought by ID.
- To use
create, get, get by ID, update, and delete a thought
, please follow the instruction from the Demo.
- Reaction Routes - a user can create a reaction and delete a reaction.
- To use
create or delete a reaction
, please follow the instruction from the Demo.
✏️ This project is license under MIT
Please refer to "Fork" or be assigned by Owner.
If you have any questions about this project, please contact me directly at ericdoan2008@gmail.com. You can view more of my projects at https://github.com/NguyenDoan85.