/socially-social

Built an API for a social network web application where users can share their thoughts, react to friends’ thoughts, and create a friend list

Primary LanguageJavaScript

Socially Social

MIT License

Table of Contents

Description

The objective of this application was to build an API for a social network web application where users can share their thoughts, react to friends’ thoughts, and create a friend list

Technologies Used

  • MongoDB
  • Mongoose
  • Express.js
  • Node.js
  • Moment.js
  • Nodemon

Installation Instructions

Node.js Installation

Make sure that you have Node.js downloaded. If you don't, follow this link: https://nodejs.org/en/ and click on the LTS version to download node.js to your entire computer. If you are on Windows, make sure to look for the section that says Download for Windows (x64). If you are using macOS, make sure to look for the section that says Download for MacOS (x64)

MongoDB Installation

Make sure that you also have MongoDB downloaded. If you don't, follow this link: https://docs.mongodb.com/manual/installation/, find the correct operating system under "MongoDB Installation Tutorials" and follow the instructions to install.

Clone the code

Once node.js is downloaded, click on the green code button and copy the link to this repository. Then open up your favorite code editor and open the terminal. In the terminal use cd to go to the root directory you want this repository to be cloned to. Finally, in the terminal, type git clone <file link> to clone this repository to your directory.

Usage Instructions

  1. After following the installation steps, run npm i to install all the necessary dependencies.

  2. Then run npm start to start the server.

  3. Go to Insomnia and follow the instructions in the "Tests" section to test out the routes. You could also look in the screenshots folder inside the images folder in the public folder to see screenshots of all the routes, or watch the screencastify video below.

Screencastify

Screencastify Link: https://drive.google.com/file/d/1y7-om1vzb2JfM9I3BcgEF6aiE4jNC1HV/view

License

Permission to use this application is granted under the MIT license. Click on the link for more information: MIT License Information

Tests

Insomnia

  1. To test the application, download insomnia. For more information on Insomnia, follow this link: https://docs.insomnia.rest/.

  2. Run npm start to start the server

  3. Go to Insomnia and test for the route you want to test. Make sure to change the route from GET to POST, PUT, Or DELETE depending on what you want to test for.

  4. The routes will be as follows (change users to posts or comments if you would like to test those routes and change :id to the id of the route you are testing for):

Insomnia Screenshots

  • /api/users

    GET (all users)

    Get All Users

    POST (user)

    Post User

  • /api/users/:userid

    GET (one user)

    Get User Id

    PUT (user)

    Put User

    DELETE (user)

    Delete User

  • /api/users/:userId/friends/:friendId

    POST (friend)

    Post Friend

    DELETE (friend)

    Delete Friend

  • /api/thoughts

    GET (all thoughts)

    Get All Thoughts

    POST (thought)

    Post Thoughts

  • /api/thoughts/:thoughtId

    GET (one thought)

    Get Thought Id

    PUT (thought)

    Put Thought

    DELETE (thought)

    Delete Thought

  • /api/thoughts/:thoughtId/reactions

    POST (reaction)

    Post Reaction

  • /api/thoughts/:thoughtId/reactions/:reactionId

    DELETE (reaction)

    Delete Reaction

Contact Me

GitHub Link: (https://github.com/nicnolen)
Email Address: nicnolen@ymail.com