Skip to content

Friendface is an API for a social network web application where users can share their thoughts, react to friends' thoughts, and create a friend list.

License

Notifications You must be signed in to change notification settings

elizabetholsavsky/friendface

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Social Network API

License: MIT Node.js Badge MongoDB Badge Mongoose Badge Express Badge Nodemon Badge Insomnia Badge

Description

Friendface is an API for a social network web application where users can share their thoughts, react to friends' thoughts, and create a friend list. The backend application uses Express.js for routing, a MongoDB database, and the Mongoose ODM. Additionally, Moment.js is used to format dates and Faker-js is used to seed mock users and thoughts in the database.

Table of Contents

Installation

  • Check if you have Node.js installed by typing node -v in your command line. If node is not installed, visit the Node.js website to install.
  • Next, clone this project repository to your computer.
  • Use the command npm i to install dependencies.
  • Seed database with random mock data via Faker-js using command npm run seed.

Usage

  • Start server with command npm start.
  • Alternatively, start server with Nodemon (and restart server automatically when making changes to code) with command npm run dev.
  • Access API routes with Insomnia, Postman, or other REST API testing client.

Watch a video demonstrating get, post, push, and delete routes for User and Thought models:

friendface.mp4

GET AND DELETE ROUTES

User URL Thought URL
Get All Users /api/users Get All Thoughts /api/thoughts
Get Single User /api/users/:userId Get Single Thought /api/users/:thoughtId
Delete User /api/users/:userId Delete Thought /api/users/:thoughtId
Delete Friend /api/users/:userId/friends/:friendId Delete Reaction /api/users/:thoughtId/reactions/:reactionId

POST AND PUSH ROUTES

URL JSON
Create User /api/users { "username": "example", "email": "[email protected]" }
Update User /api/users/:userId { "username": "example", "email": "[email protected]" }
Add Friend /api/users/:userId/friends/:friendId
Create Thought /api/thoughts { "thoughtText": "Lorem Ipsum", "username": "example", "userId": "123" }
Update Thought /api/thoughts/:thoughtId { "thoughtText": "Lorem Ipsum" }
Create Reaction /api/thoughts/:thoughtId/reactions { "reactionBody": "Lorem!", "username": "example" }

License

MIT License

Contributing

This application was created as part of a UT Full Stack Coding Bootcamp challenge.

Tables created using table-magic by Steve GunTrip (stevecat).

Contact

About

Friendface is an API for a social network web application where users can share their thoughts, react to friends' thoughts, and create a friend list.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published