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
- MongoDB
- Mongoose
- Express.js
- Node.js
- Moment.js
- Nodemon
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)
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.
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.
-
After following the installation steps, run
npm i
to install all the necessary dependencies. -
Then run
npm start
to start the server. -
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 Link: https://drive.google.com/file/d/1y7-om1vzb2JfM9I3BcgEF6aiE4jNC1HV/view
Permission to use this application is granted under the MIT license. Click on the link for more information: MIT License Information
-
To test the application, download insomnia. For more information on Insomnia, follow this link: https://docs.insomnia.rest/.
-
Run
npm start
to start the server -
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.
-
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):
-
/api/users
GET (all users)
POST (user)
-
/api/users/:userid
GET (one user)
PUT (user)
DELETE (user)
-
/api/users/:userId/friends/:friendId
POST (friend)
DELETE (friend)
-
/api/thoughts
GET (all thoughts)
POST (thought)
-
/api/thoughts/:thoughtId
GET (one thought)
PUT (thought)
DELETE (thought)
-
/api/thoughts/:thoughtId/reactions
POST (reaction)
-
/api/thoughts/:thoughtId/reactions/:reactionId
DELETE (reaction)
GitHub Link: (https://github.com/nicnolen)
Email Address: nicnolen@ymail.com