Skip to content

Yandex.Practicum. Web Development training course. Graduate work. Movies-Explorer application Backend.

Notifications You must be signed in to change notification settings

At0m234/movies-explorer-backend

Repository files navigation

Yandex.Practicum. Web Development training course. Graduate work. Movies-Explorer application Backend.

Functionality

Movies-Explorer - backand of adaptive multi-page application. Server allows you:

  • register (hash password);
  • login;
  • edit information about yourself;
  • search for movies;
  • save the movies you like.

Available Scripts

npm run start

starts the server on PORT = 4000;

npm run dev

starts the server in development mode with hot-reload on PORT = 4000;

Requests

POST http://localhost:4000/signup

Registration;

POST http://localhost:4000/signin

Login;

GET http://localhost:4000/users/me

Returns user info;

PATCH http://localhost:4000/users/me

Updates user info;

GET http://localhost:4000/movies

Returns saved movies;

POST http://localhost:4000/movies

Creates movie;

POST http://localhost:4000/movies/:movieId

Removes movie from saved;

Directories

/controllers

folder with movies and users request controllers;

/errors

folder with request error classes;

/middlewares

folder with authorization, limiter, logger and centralized-error-handlers middlewares;

/models

folder with schemas of the user and the movie;

/routes

folder with request routes.

Stack

Node.js

Express

Mongoose

MongoDB

Celebrate

Logger