Skip to content

joelgenaro/user-crm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NestJS REST API

Description

NestJS REST API for typical project

Table of Contents

Features

Quick run

git clone https://github.com/tboclothing/nestjs-apis.tbo.clothing.git
cd nestjs-apis.tbo.clothing/
cp env-example .env

Run additional container (optional):

docker-compose up -d postgres adminer maildev redis

Setup Postgres database manually for localhost:

sudo -u postgres createuser postgres
sudo -u postgres createdb tboclothing_v2
sudo -u postgres psql
alter user postgres with encrypted password '123456';
grant all privileges on database tboclothing_v2 to postgres;

Run manual commands:

npm install

npm run migration:run

npm run seed:run

npm run start:dev

Links

Database utils

Generate migration

npm run migration:generate -- CreateNameTable

Run migration

npm run migration:run

Revert migration

npm run migration:revert

Drop all tables in database

npm run schema:drop

Run seed

npm run seed:run

Tests

# unit tests
npm run test

# e2e tests
npm run test:e2e

Tests in Docker

docker-compose -f docker-compose.ci.yaml --env-file env-example -p ci up --build --exit-code-from api && docker-compose -p ci rm -svf

Test benchmarking

docker run --rm jordi/ab -n 100 -c 100 -T application/json -H "Authorization: Bearer USER_TOKEN" -v 2 http://<server_ip>:3000/api/v1/users

About

Nest.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published