Social Network API is an API for a social network web application where users can share their thoughts, react to friends’ thoughts, and create a friend list. This API is built by Express.js, MongoDB database, and Mongoose package.
The details for how this API work is in Tests section.
Instructions to get the application run:
- Download and install Visual Studio Code if user don't have it installed in the computer.
- Download and install Node.js if user don't have it installed in the computer.
- Open the terminal, first run
npm install express mongoose moment
to install all the packages:express
is for the API routes.mongoose
is Object Data Manager.moment
is for format the timestamps.
The application server itself runs by command npm start
.
Social Network API gives a social network API:
- when user enters the command to invoke the application, then the server is started and the Mongoose models are synced to the MongoDB database.
- when user opens API GET routes in Insomnia Core for users and thoughts, then the data for each of these routes is displayed in a formatted JSON.
- when user tests API POST, PUT, and DELETE routes in Insomnia Core, then user is able to successfully create, update, and delete users and thoughts in the database.
- when user tests API POST and DELETE routes in Insomnia Core, then user is able to successfully create and delete reactions to thoughts and add and remove friends to a user’s friend list.
The demoes for API testing are in Tests section
This project is under license MIT
Not Available
The application's API routes being tested in Insomnia Core.
Start Server, Find All Users and Thoughts
Find Single User and Thought By ID
User Create, Update, and Delete
Thought Create, Update, and Delete
The lists of resources used to complete this challenge:
- Module 18 NoSQL from canvas.
- Google (https://www.google.ca/)
- MDN Web Docs (https://developer.mozilla.org/en-US/docs/Web/JavaScript).
- mongoDB (https://docs.mongodb.com/manual/mongo/).
- mongoose (https://mongoosejs.com/).
- mongoose validation (https://mongoosejs.com/docs/validation.html).
- moment npm (https://www.npmjs.com/package/moment).
- Supports from instructor, assistant instructor and Tutor.
For any questions, please contact me with the information below:
GitHub: @shanshantina
Email: [email protected]