Open talantbekov123 opened 2 years ago
You've done a really good job! Glad to say that your project has been accepted.
_id
is added in .eslintrc. The following rules are forbidden: eslint-disable
, eslint-disable-line
, and eslint-disable-next-line
npm run start
command that starts the server on localhost:3000
.npm run dev
command that starts the server on localhost:3000
with hot reloading.GET /users/me
returns information about the user (email and name).GET /articles
returns all articles saved by the user.POST /articles
creates an article with the data passed inside the request body.DELETE /articles/articleId
deletes the saved article using _id
.POST /signup
creates a user with the data passed inside the request body.POST /signin
returns a JWT when the correct email and password are passed in the request body./signin
and /signup
.catch()
block.process.env
..env
file, and this file should not be added to Git.process.env.NODE_ENV !== 'production'
), the code runs and works fine and an error won't occur if there is no .env
file present.request.log
file.error.log
file.README.md
. index.js
file, which is located in the routes
folder, and app.js
contains one main route handled by routes.
Summary:
You've done a really good job! There are a couple of things that need to be done before your project can be accepted. Please take a look, I attached screenshots below comments where applicable. Hope they will be easy to fix.
Note: I may attach only one screen, but you need to find all similar cases inside the project and fix them to receive points.
Create pull request and send link to pull request, I can not accept project without a pull request.
Backend
Performance Criteria
_id
is added in .eslintrc. The following rules are forbidden:eslint-disable
,eslint-disable-line
, andeslint-disable-next-line
npm run start
command that starts the server onlocalhost:3000
.npm run dev
command that starts the server onlocalhost:3000
with hot reloading.GET /users/me
returns information about the user (email and name).GET /articles
returns all articles saved by the user.POST /articles
creates an article with the data passed inside the request body.https://snipboard.io/ocyMeH.jpg when creating an article, the owner should be received from token passed in auth (req.user = payload;).
DELETE /articles/articleId
deletes the saved article using_id
.POST /signup
creates a user with the data passed inside the request body.https://snipboard.io/fGItAK.jpg When creating a user with an email that already exists in the database, you must return an error with the status code 409 (Conflict) instead of 500. You can catch the error by using err.name = MongoError and err.code = 11000.
POST /signin
returns a JWT when the correct email and password are passed in the request body./signin
and/signup
.catch()
block.https://snipboard.io/fGItAK.jpg
process.env
.https://snipboard.io/xoDBVj.jpg
.env
file, and this file should not be added to Git.process.env.NODE_ENV !== 'production'
), the code runs and works fine and an error won't occur if there is no.env
file present.Best Practices
https://snipboard.io/Uuh9Nl.jpg limiter подключен перед логгером запросов. Запросы, отклоненные лимитером, не будут добавлены в лог запросов. Необходимо первым в цепочке подключить логгер, а затем limiter
request.log
file.error.log
file.README.md
.index.js
file, which is located in theroutes
folder, andapp.js
contains one main route handled by routes.https://snipboard.io/Z7hsGB.jpg
Recommendations
https://snipboard.io/xoDBVj.jpg
https://snipboard.io/QMLf0q.jpg
Number of points: 64