Skip to content

pwangy/PROJECT-Happy-Thoughts-API

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Happy Thoughts API - Overview

Building and API to handle GET and POST requests to connect with the frontend project from a previous assignment.

Learning objectives:

  • 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

Completed Requirements

🔵 Blue Level

  • The API should be deployed to Heroku or similar hosting service.
  • The database should be deployed using mongo cloud or similar.
  • The API should implement the routes exactly as documented in the brief (A copy of the brief can be found in the production folder as a .pdf).
  • The GET /thoughts endpoint should only return 20 results, ordered by createdAt in descending order.
  • The API should validate user input and return appropriate errors if the input is invalid.
  • In the POST /thoughts endpoint to create a new thought, if the input was invalid and the API is returning errors, it should set the response status to 400 (bad request).
  • The endpoint to add hearts to a thought should return an appropriate error if the thought was not found.

View it live

backend: https://happy-thoughts-api-pwangy.herokuapp.com/

frontend: https://pwangy-happy-v2.netlify.app/

About

A Twitter clone, now with a backend!

Topics

Resources

Stars

Watchers

Forks

Languages

  • JavaScript 100.0%