Coder Social home page Coder Social logo

elizabetholsavsky / friendface Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 127 KB

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: MIT License

JavaScript 100.00%
express mongoose node nodemon faker-js moment mongodb social-network-api bootcamp-challenge

friendface's Introduction

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

friendface's People

Contributors

elizabetholsavsky avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.