Backend for diploma project : Movies Explorer API from Yandex Practicum Web-developer course.
Backend: https://api.movies-explorer-api.nomoredomainsrocks.r
Backend for Movies Explorer project with the following features: user registration and authentication, add movies to favorites, list and delete from favorites.
-
Users routes:
GET /users/me
— return user infoPATCH /users/me
— update user info
-
Movies routes:
GET /movies
— return all movies added to favoritesDELETE /movies/:_id
— delete movie added to favorites by _idPOST /movies
— create movie with the data provided in the request body:- country,
- director,
- duration,
- year,
- description,
- image,
- trailer,
- thumbnail,
- movieId,
- nameRU and nameEN.
-
Other routes
POST /signup
- create user with the data provided in the request bodyPOST /signin
- return JWT if the provided email and password in the request body are correctGET /signout
- delete JWT from cookies.
/routes
- folder with routes files
/controllers
- folder with controllers files(users&movies)
/models
- folder with schemas(user&movie)
/utils
- folder with auxiliary files
/middlewares
- folder with middlewares
/errors
- folder with Error classes that extend the error constructor
- Node.js;
- Express
- MongoDB
- mongoose
- JavaScript:
- CamelCase style;
- Common JS modules;
- Promise, asynchronous functions;
Clone repository:
git clone [email protected]:щшдштффмвуумф/movies-explorer-api.git
Install dependencies:
npm install
Run app:
npm run start
— start server
npm run dev
— start hot-reload server