Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solution #326

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

solution #326

wants to merge 1 commit into from

Conversation

HokageHEL
Copy link

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.


Great job on implementing the server functionality! 🎉 Your code meets the task requirements and constraints effectively. The server processes the request URL and query parameters correctly, returning the expected JSON object. While the use of replaceAll('//', '/') might not be necessary and could potentially alter URLs with intentional double slashes, it doesn't critically impact the current functionality. Keep up the good work, and consider revisiting this part to ensure it aligns with your intended use cases. Happy coding! 😊

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

// Return instance of http.Server class
return http.createServer((req, res) => {
const requestURL = new URL(
req.url.replaceAll('//', '/'),

Choose a reason for hiding this comment

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

The use of replaceAll('//', '/') may not be necessary or could lead to unexpected results if the URL contains double slashes intentionally. Consider whether this replacement is needed or if it could be handled differently to avoid altering the URL in unintended ways.

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