This project built by Nest framework, and dockerize the project and database
$ pnpm install
use Docker to build all app
$ docker compose up
and if you want to develop, use pnpm
to start this project
# development
$ pnpm run start
# watch mode
$ pnpm dev
$ pnpm start: dev
# production mode
$ pnpm run start:prod
open the watch mode and access localhost:3000//api/doc
path, access the api document
$ pnpm dev
- Use
/init
interface to create seed data - Use
/auth/login
to login, and if username and password are correct, it will return a JWT token - if username is incorrect, it will return
User not exist
, and if password is incorrect, it will returnPassword error
- When a user has an incorrect password and tries 3 times in 5 minutes, they will be blocked. and it will return
User has been blocked
# unit tests
$ pnpm run test
# e2e tests
$ pnpm run test:e2e
# test coverage
$ pnpm run test:cov