GithubHelp home page GithubHelp logo

project-happy-thoughts-api's Introduction

Project Happy Thoughts API

In week 19 of the Technigo Front End Bootcamp the assignment was to use Express and Mongo DB to build an API that include both GET request endpoints and POST endpoints to create data.

The problem

The fundamental idea is for it to be an API used for a pervious frontend project called Happy Thoughts - a twitter like site focusing on positivity and friendliness where the user can post own thoughts, and read and like thoughts from others.

General requirements:

  • The API should implement the routes GET /thoughts, POST /thoughts and POST /thoughts/thoughtId/like
  • 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.

It was a lot of fun to go full circle with front and backend code, both of which I have created! I have saved some unused and commented out code in this project for future reference โ€“ as I would like to add more of the methods for additional features, like deleting and editing a posted thought.

The API is deployed to Heroku and the database is deployed using Mongo Cloud.

View it live

Link to API: https://is-happy-thoughts.herokuapp.com/ Link to API endpoint of thoughts: https://is-happy-thoughts.herokuapp.com/thoughts Link to fullstack project: https://pensive-shirley-fd39b0.netlify.app/

project-happy-thoughts-api's People

Contributors

emolsz avatar dependabot[bot] avatar idlefingers 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.