Git Product home page Git Product logo

project-happy-thoughts-api's Introduction

Happy Thoughts App

An API used for fetching and posting data with MongoDB. Similar to Twitter, the user get to like and post short messages. Built for happy thoughts.

View it live

API https://rautellin-happy-thoughts-api.herokuapp.com/

Frontend https://rautellin-happy-thoughts.netlify.app/

What I learned ๐Ÿง 

  • How to validate data
  • How to build a full API which includes handling of user input
  • How to include error handling to return good validation errors
  • How to build an API which works well with an existing frontend

Requirements I reached ๐Ÿงช

  • The API implements the required routes
  • The GET / endpoint only returns 20 results, ordered by createdAt in descending order
  • The API validate user input and return appropriate errors if the input is invalid
  • In the POST / endpoint to create a new thought, if the input was invalid and the API is returning errors, it set the response status to 400 (bad request)
  • The endpoint to add hearts to a thought returns an appropriate error if the thought was not found
  • The API is deployed to Heroku

Stretch-goals I reached ๐Ÿง˜

  • Added tags in order to organize them.
  • Allowed users to enter their name in a new property on the thought model, or remain anonymous.
  • Added filtering and sorting options to the endpoint which returns all thoughts. So you could choose to sort by oldest first, or only show thoughts which have a lot of hearts.

project-happy-thoughts-api's People

Contributors

idlefingers avatar rautellin 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.