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

Lab2 #2

Merged
merged 21 commits into from Dec 7, 2022
Merged

Lab2 #2

merged 21 commits into from Dec 7, 2022

Conversation

devule
Copy link
Collaborator

@devule devule commented Nov 13, 2022

No description provided.

@devule devule requested a review from nosovk November 13, 2022 23:11
@devule devule marked this pull request as ready for review November 13, 2022 23:11
package.json Show resolved Hide resolved
@devule
Copy link
Collaborator Author

devule commented Nov 21, 2022

@nosovk
GET / - plain text
GET /json - json
GET /users - users list (json)
GET /users/:index - one user
POST /users { name, age } - create
nodejs.samoyed.space

@nosovk
Copy link
Collaborator

nosovk commented Dec 3, 2022

image

@nosovk
Copy link
Collaborator

nosovk commented Dec 3, 2022

Users считается с 0
image
но нулевого взять нельзя, в итоге первый пользователь из list не доступен

@f1ctashka
Copy link
Owner

@nosovk пофиксили валидацию

return new Promise((resolve, reject) => {
const chunks: Uint8Array[] = [];

this.request.on('data', (chunk: Uint8Array) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

я бы for await тут рекомендовал

src/core/request-info.ts Outdated Show resolved Hide resolved
src/core/router.ts Outdated Show resolved Hide resolved
@nosovk
Copy link
Collaborator

nosovk commented Dec 3, 2022

В целом можно мерджить.
Сильные стороные: корректное применение exceptions, это очень радует. В целом это вызывает у многих проблемы.
Корректное использование TS. В целом это певрая работа где я не тригерился что его лучше удалить нафиг.
Мелкие недочеты скорее носят стилистический характер. Там где AS ничего сломаться не может, просто можно без него обойтись, но там и так и так все будет работать.

@devule devule merged commit 1553d5d into main Dec 7, 2022
@devule devule deleted the feature/lab2 branch December 7, 2022 18:58
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.

None yet

3 participants