Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

40 Commits

Folders and files

Repository files navigation

Project Happy Thoughts API Backend ❤️💌

I built a Happy Thoughts API using Express and MongoDB in Node that included both GET and POST endpoints. I created a Thought Mongoose Schema and Model that represents the structure and holds properties for the message string, a heart property for tracking the number of likes, and a createdAt property to store when the thought was added.

Documentation

GET /thoughts This endpoint allows the user to retrive a maximum of 20 thoughts that has been sorted by createdAt and will show the most recent thoughts first.

POST /thoughts This enpoint allows the user to post thought message via a JSON body. To ensure consistent data, two validators has been included, a minlength 5 and maxlength 140.

POST thoughts/:thoughtId/like This endpoint allows the user to increase the likes of a specific thought. Given a valid thought id in the URL, the enpoint should find the thought and update its heart property.

DELETE/thoughts This enpoint allows the user to delete a thought based on the given id.

Tech

Node.js
Express
Mongoose
MongoDB Atlas / Heroku

View it live

You can view my app live here: https://mt-dotse-happy-thoughts.netlify.app/

API is live in Heroku here: https://mtdose-happy-thoughts.herokuapp.com/thoughts

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages