Skip to content

ladown/nodejs-mesto-project

Repository files navigation

Mesto Backend — Node.js REST API

RESTful API backend for the Mesto photo-sharing application — handles authentication, user profiles, and photo cards.

Tech Stack

Node.js Express TypeScript MongoDB

Features

  • JWT authentication with bcrypt password hashing
  • CRUD operations for users and photo cards
  • Request validation with Celebrate/Joi
  • Centralized error handling middleware
  • Mongoose schemas with reference relationships
  • Logging of requests and errors

Getting Started

npm install
npm run dev

The API will run on http://localhost:3000.

Build

npm run build
npm run start

API

Main endpoints:

  • POST /signup — register a new user
  • POST /signin — authenticate and receive JWT
  • GET /users/me — get current user profile
  • GET /cards — list all photo cards
  • POST /cards — create a new card
  • PUT /cards/:id/likes — like a card

About

This is a learning project from the Web Development Master's program at NUST MISIS in partnership with Yandex Practicum, focused on building a production-ready REST API with authentication, validation, and proper error handling.

About

RESTful API backend for the Mesto photo-sharing app: JWT authentication, request validation, centralized error handling. Built with Node.js, Express, and MongoDB (Mongoose).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors