This repo contains homeworks (work assignments) from the Yandex Web developer course.
Each folder represents complete singular assignment.
For PR-1…10 no additional tools are required (no sass, npm, etc.) — just open in your editor of choice.
PR-11 is a simple instagram-like client for Places API. You’ll need NPM and IDE to use it.
You can check the live version at github pages
Project contains two usual build configurations:
npm run dev
for local debugnpm run build
for production build
Latest version 0.1.0
:
- moved to webpack
- rewrite to js modules
PR-12 is the first attempt for a simple “Places” instagram-like client and API. You’ll need NPM and IDE to use it.
Project contains two build configurations:
npm run dev
starts in hot-reload modenpm run start
start without hot-reload
All builds default to http://localhost:3000/
.
Places API description:
/users
returns ALL users/users/{id}
returns SINGLE users by ID/cards
returns ALL cards
Release notes for 0.2.0
:
- client (from PR-11) still connected to Yandex.Praktikum API instead of ours
- local API is hardwired to json data-stubs
PR-13 is the second attempt for a simple “Places” instagram-like API. You’ll need NPM, MongoDB, and IDE to use it.
Project contains two build configurations:
npm run dev
starts in hot-reload modenpm run start
start without hot-reload
All builds default to http://localhost:3000/
and mongodb://localhost:27017/mestodb
.
Places API description:
GET /users
returns ALL usersGET /users/{id}
returns SINGLE user by IDPOST /users
creates new user with{ name, about, avatar }
GET /cards
returns ALL cardsDELETE /cards/{id}
deletes card by IDPOST /cards
creates new card with{ name, link }
Release notes for 0.3.0
:
- local API is now connected to MongoDb instead of hardwired json data-stubs
- front-end client code (from PR-11) hosting is removed from API
PR-14 is the third attempt for a simple “Places” instagram-like API. You’ll need NPM, MongoDB, and IDE to use it.
Project contains two build configurations:
npm run dev
starts in hot-reload modenpm run start
start without hot-reload
.env
file is configured to store the production JWT sign key.
All builds default to http://localhost:3000/
and mongodb://localhost:27017/mestodb
.
Places API description:
POST /signup
creates new user with{ name, about, avatar, email, password }
POST /signin
with{ email, password }
— return http-only 7-day cookie with JWTGET /users
returns ALL usersGET /users/{id}
returns SINGLE user by IDGET /cards
returns ALL cardsDELETE /cards/{id}
deletes card by ID (if user owns the card)POST /cards
creates new card with{ name, link }
Release notes for 0.4.0
:
- local API is now configured for http-only cookies with JWT instead of hardcoded user id
- two new methods available:
/signup
and/signin
DELETE /cards/{id}
now deletes the card only if it was created by the same user -.env
file is configured to store the production JWT sign key.
PR-15 is the forth and final attempt for a simple “Places” instagram-like API. You’ll need NPM, MongoDB, and IDE to use it.
Project contains two build configurations:
npm run dev
starts in hot-reload modenpm run start
start without hot-reload
.env
file is configured to store the production JWT sign key.
All builds default to http://localhost:3000/
and mongodb://localhost:27017/mestodb
.
Production API is at: https://api.divulge-uncommon.ru (84.201.172.80
)
Places API description:
POST /signup
creates new user with{ name, about, avatar, email, password }
POST /signin
with{ email, password }
— return http-only 7-day cookie with JWTGET /users
returns ALL usersGET /users/{id}
returns SINGLE user by IDGET /cards
returns ALL cardsDELETE /cards/{id}
deletes card by ID (if user owns the card)POST /cards
creates new card with{ name, link }
Release notes for 1.0.0
:
- Winston logging at
error.log
andrequest.log
- request parameters and body validation using Celebrate
- centralized error handling