Skip to content

Using mongoDB and mongoose to create a social network API.

License

Notifications You must be signed in to change notification settings

laurelthorburn/Social-Network-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Social-Network-API

Description

The purpose of this project was to utilize mongoDB, mongoose, and Express.js to create a social network where the user can add/remove friends, thoughts, and reactions. Using insomnia, you are able to fetch information from the mongo database. In addition, moment.js was used in order to format the date in a more human-friendly manner. Enjoy!

License: MIT

Table of Contents

  1. Description.
  2. User Story.
  3. Acceptance Criteria.
  4. Installation.
  5. License.
  6. Contributing.
  7. Tests.
  8. Questions.
  9. Video.
  10. Screenshots.
  11. Links.
  12. Resources/Credit.

User Story

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

Acceptance Criteria

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

Installation

  • Clone the repository using:
git clone https://github.com/laurelthorburn/Social-Network-API.git
  • Ensure you are in the current working directory
  • Install dependencies by opening the terminal (ctrl + j on windows) and running:
npm install || npm i
  • Run the project by typing the following in the terminal:
npm run start || npm run dev (if nodemon is installed)

License

Copyright <2021>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Contributing

  1. Fork the repo!
  2. Create a feature branch:
git checkout -b yourname-branch
  1. Commit changes:
git commit -m 'Your changes here'
  1. Push to the branch:
git push origin yourname-branch
  1. Submit a pull request and wait for it to be approved or denied.

Tests

No tests at this time

Questions?

Want to see more of my work? Click here!

Questions/comments/concerns? Please send an email to codinglaurel@gmail.com

Video

View video: https://drive.google.com/file/d/15jGrsoLFN71YA05zIln0W4iWwZNylVyL/view?usp=sharing

Screenshots

Screenshot of Find One User by ID Screenshot of Update a User Screenshot of Add a Friend

Links

Github Site: https://github.com/laurelthorburn/Social-Network-API

Resources/Credit

About

Using mongoDB and mongoose to create a social network API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published