The Social Network API is a social network application where users can be created, and users can share their thoughts, react to friends' thought, and create a friend list.
The application uses Express.js for routing, a MongoDB database used with Mongoose ODM, and Moment for formatting timestamps. Go to GitHub for the Social Network API code. The app is not deployed, so must be downloaded and run locally.
This application uses the following technologies:
Dependencies
Dev dependencies
Local deployment (suggested)
- Access the Social Network API app via its Github repo
- See this video for instructions on installing and running the Social Network API app. The video also includes a detailed demonstration of the app's functionality.
The Social Network API provides the following API routes to create, update and delete users, friends, and posts.
GET
all usersGET
a single user by its_id
and populated thought and friend dataPOST
a new userPUT
to update a user by its_id
DELETE
to remove user by its_id
POST
to add a new friend to a user's friend listDELETE
to remove a friend from a user's friend list
GET
to get all thoughtsGET
to get a single thought by its_id
POST
to create a new thoughtPUT
to update a thought by its_id
DELETE
to remove a thought by its_id
POST
to create a reaction stored in a single thought'sreactions
array fieldDELETE
to pull and remove a reaction by the reaction'sreactionId
value
To install and run the Social Network API locally,
-
Download or clone the code from the Social Network API github repo
-
Install MongoDB
-
Install MongoDB Compass (if you are using Windows)
-
Open in your preferred terminal (e.g. Visual Studio Code's integrated terminal)
-
Navigate to the specified folders in order and run the following commands:
-
To install dependencies, in the root directory run :
npm install
-
After installation, in the root directory, start the server by running:
node index.js
-
-
No seed data is provided with the app, so after installing use a POST request to create a user (createUser). For instructions, see this video
- Contributions are welcome.
- The code is located in this GitHub repo
- To contribute, open a new issue describing your proposed enhancement or fix.
- Before contributing, browse through open issues to see if your issue already exists or if there is an issue or enhancement you could to solve.
- If you're a newbie dev, start contributing by looking for issues labelled "good first issue"
- It is good practice to set up your project repository as an "upstream" remote and synchronize with the project repository
- Don't update the main branch. Rather create your own branch using a brief descriptive name and make your changes there
- You can create pull requests, but only admins can review and merge.
- Be nice to your reviewer by adding adding a plain English explanation of your pull request and how your updates addresses the issue/s or enhancements
- Also see the GitHub Community Guidelines
See this video a detailed demonstration of the app's functionality.
© 2022 Helen Anderson
This project is licensed under the MIT License.