Skip to content

webmakaka/NestJS-Building-Real-Project-API-From-Scratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[Oleksandr Kocherhin] NestJS - пишем API для реального проекта с нуля [RUS, 2021]


Аналогичный проект с кодом на 2021 год


$ sudo apt install -y jq

$ volta install node@18 npm@9 yarn@3

$ npm install -g @nestjs/cli
$ npm install -g typescript

$ nest -v
9.3.0

Запуск

$ git clone https://github.com/webmakaka/NestJS-Building-Real-Project-API-From-Scratch.git

// Запуск базы
$ cd NestJS-Building-Real-Project-API-From-Scratch/docker
$ docker-compse up

// Создание структур таблиц и добавление данных
$ cd app
$ yarn db:drop
$ yarn db:migrate
$ yarn db:seed

// Запуск приложения
$ cd NestJS-Building-Real-Project-API-From-Scratch/app
$ yarn install
$ yarn start

// Проверка разработанного приложения тестами
$ git clone https://github.com/gothinkster/realworld.git
$ cd /realworld/api

$ export APIURL=http://localhost:3000/api
$ export USERNAME=marley4
$ export EMAIL=marley4@example.com
$ export PASSWORD=pass123

$ ./run-api-tests.sh

┌─────────────────────────┬───────────────────┬──────────────────┐
│                         │          executed │           failed │
├─────────────────────────┼───────────────────┼──────────────────┤
│              iterations │                 1 │                0 │
├─────────────────────────┼───────────────────┼──────────────────┤
│                requests │                32 │                0 │
├─────────────────────────┼───────────────────┼──────────────────┤
│            test-scripts │                48 │                2 │
├─────────────────────────┼───────────────────┼──────────────────┤
│      prerequest-scripts │                18 │                0 │
├─────────────────────────┼───────────────────┼──────────────────┤
│              assertions │               290 │               36 │
├─────────────────────────┴───────────────────┴──────────────────┤
│ total run duration: 17.6s                                      │
├────────────────────────────────────────────────────────────────┤
│ total data received: 10.63kB (approx)                          │
├────────────────────────────────────────────────────────────────┤
│ average response time: 24ms [min: 4ms, max: 135ms, s.d.: 28ms] │
└────────────────────────────────────────────────────────────────┘

Разработка




Marley

Any questions in english: Telegram Chat
Любые вопросы на русском: Телеграм чат

About

[Oleksandr Kocherhin] NestJS - пишем API для реального проекта с нуля [RUS, 2021]

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published