Аналогичный проект с кодом на 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
Любые вопросы на русском: Телеграм чат