fhkahin / Coursework-Planner

Your coursework planner
0 stars 0 forks source link

[TECH ED] Chat Server API Project #275

Open fhkahin opened 1 month ago

fhkahin commented 1 month ago

From Module-Servers created by Dedekind561: CodeYourFuture/Module-Servers#12

Link to the coursework

https://github.com/CodeYourFuture/Module-Node/tree/main/chat-server

Why are we doing this?

In this project, you'll be able to start building out different method endpoints that accept POST requests.

You'll need to complete up to Level 1 in the Chat server API project.

Maximum time in hours

12

How to get help

Share your blockers in your class channel https://syllabus.codeyourfuture.io/guides/asking-questions

How to submit

  1. Fork to your Github account.
  2. Make a branch for this project.
  3. Make regular small commits in this branch with clear messages.
  4. When you are ready, open a PR to the CYF repo, following the instructions in the PR template.
gitGraph
    commit id: "start"
    branch feature/chat-server-project
    commit id: "skeleton page code"
    commit id: "Fonts and colours"
    commit id: "mobile layout"
    commit id: "lighthouse audit revisions mobile"
    commit id: "desktop layout"
    commit id: "lighthouse audit revisions desktop"
    checkout main
    merge feature/chat-server-project

There are several projects in this repo. Make a new branch for each project.

fhkahin commented 1 month ago

https://github.com/CodeYourFuture/Module-Servers/pull/162

chettriyuvraj commented 1 month ago

Good job and neat code - I think you are thinking about things in the right way!

Your use of different response codes shows that you are thinking about them, which is fantastic! Keep in mind that using these codes comes with its set of responsibilities - HTTP codes were designed such that the consumer of the API can have a very specific set of expectations from the response depending upon the code. For e.g. you have used a 201 when posting a message, which requires a very specific field to be set in the response header (I encourage you to find out which one). Can this field be set? If not - should you change your response status code?

Can you think of reasons in general why we should adhere to HTTP conventions? Or some reasons why you feel we shouldn't?