This project's main goal is to learn POST requests: expose users to my endpoints, allowing them to POST data to my API and then use that data to save new objects to my Mongo Database.
For this I'll be using the "Happy Thoughts" Frontend: this is a Twitter-like app including a form in which users can write a new 'happy thought', list recent thoughts, and it also shows a count of 'hearts' on each thought. Users can then click the heart to like a thought. For this to work, I created an API in the Backend using Express and MongoDB including both GET request endpoints to return data and POST endpoints to create data.
Find the Happy Thoughts Frontend live here: https://happy-thoughts-react-project.netlify.app/ (and its repository here: https://github.com/DALA746/project-happy-thoughts
- How to use POST requests to send data to your API
- How to store data in your database from POST requests
- How to validate data and ensure your database only contains 'good' data
- How to build a full API which includes handling of user input
- How to build an API which works well with an existing frontend
Backend: https://project-happy-thoughts-api-production.up.railway.app