Skip to content

first commit#451

Open
SaXoNG wants to merge 2 commits intomate-academy:masterfrom
SaXoNG:develop
Open

first commit#451
SaXoNG wants to merge 2 commits intomate-academy:masterfrom
SaXoNG:develop

Conversation

@SaXoNG
Copy link

@SaXoNG SaXoNG commented Feb 4, 2026

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Excellent work on this project! Your server correctly meets all the functional requirements by successfully parsing URL pathnames and query parameters into the specified JSON format. I am approving your submission.

I have one small suggestion to make your code in src/createServer.js more concise. The URL object you create already parses the query string, so you can get the parameters directly from url.searchParams. This would let you remove the manual string splitting, making the code a bit cleaner. This is just a suggestion for improvement, not a required change. Keep up the great work!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

const server = require('http').createServer((req, res) => {
res.setHeader('Content-Type', 'application/json');

const [, query] = req.url.split('?');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line manually extracts the query string, but the URL object you create on line 10 already does this for you. You can get a URLSearchParams object directly from url.searchParams. Using it would allow you to remove this line and line 12, making the code more direct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants