Repository navigation
Conversation
- Added backend with Express server and message handling routes - Implemented message sending, fetching, and reacting functionalities - Created frontend HTML structure for chat interface - Developed JavaScript for message rendering and user interactions - Styled chat application with CSS for better user experience
- Added package.json for backend with necessary dependencies (express, cors, crypto). - Implemented server.js for handling message retrieval, sending, and reactions with long-polling support. - Created index.html for the frontend chat interface with a message input area and display for chat messages. - Developed script.js to manage message fetching, sending, and user interactions (like, dislike, reply). - Styled the chat application with style.css for a user-friendly interface.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
3 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
LonMcGregor
reviewed
Oct 7, 2026
LonMcGregor
left a comment
Contributor
There was a problem hiding this comment.
Good start on this task, apologies for the late review.
I've spotted a couple of areas you could look at again, see my comments below.
|
|
||
| if (req.username) { | ||
| res.send( | ||
| `You are authenticated as ${req.username}.\n\n` + |
Contributor
There was a problem hiding this comment.
Given these messages are quite similar, could you rework the if block to reduce the code duplication?
| next(); | ||
| } | ||
|
|
||
| app.use(express.json()); |
Contributor
There was a problem hiding this comment.
Does express.json() do all of the checks you did in your original code?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
CYF-1165
wrote two new middleware demonstrating Express middleware.