Backend part for the application which helps find movies according to the request and save them as chosen ones.
The project was done as a diploma work within Yandex Practicum course "Web-developer".
Link to the project https://api.movies.proactative.nomoredomains.work
npm run start — start the server
npm run dev — start the server with hot-reload
Middleware apiLimiter limits the amount of requests to 100 within 15 minutes.
Middleware auth protects all routes except /signin and /signup.
Middleware error is used for processing errors.
Middleware logger keeps logging errors in error.log and requests in request.log at the server.
Password is kept as a hash and API doesn`t return it to the user.
User can delete only his/her saved movie.
/routes
/controllers
/models
/middlewares
/errors
/utils
| API request | Route | Aim |
|---|---|---|
| POST | /signin |
authorization |
| POST | /signup |
registration |
| GET | /users/me |
get information about the user |
| PATCH | /users/me |
update information about the user |
| GET | /movies |
get user`s movies |
| POST | /movies |
add a movie |
| DELETE | /movies/:id |
delete the movie by id |
- Express
- Mongoose
- Jsonwebtoken
- Bcryptjs
- Celebrate/Joi
- Winston
- Body-parser
- Helmet
- Express-rate-limit
- Validator
for development
- ESLint
- Nodemon