-
Notifications
You must be signed in to change notification settings - Fork 177
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 #101
base: master
Are you sure you want to change the base?
solution #101
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
I left a comment about using constants.
Many thanks)
src/createServer.js
Outdated
if (normalizedText === '/') { | ||
await httpGetMainPage(res); | ||
|
||
return; | ||
} | ||
|
||
const verifiedPath = httpVerifyRequest(res, normalizedText, method); | ||
|
||
if (!verifiedPath) { | ||
return; | ||
} | ||
|
||
if (method === 'POST' && normalizedText === '/compress') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'/' and '/compress' move in constants.
Also, all methods ( 'POST' and others) move to constants.
Finally, move all statuses in constants. ( for all files)
Then use their in all files.
Thanks)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DanilWeda I will make it on my laptop, because I like this approach, but I will not commit new changes)
Is it ok for you?
Tests work awful I am afraid to move something while the result is green)))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have found the mistake. And have updated the code) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 👍 👍
Hi)
Have a nice day)