This is a simple Node.js application that uses the NestJS framework to create a REST API for a simple server. The application uses ioredis to connect to a Redis database. The redis database is used for caching and to persist shot lived data i.e token. The application uses Jest for unit testing.
# Redis Host
REDIS_HOST=
# Redis Port
REDIS_PORT=
$ yarn
# development
$ yarn start
# watch mode
$ yarn start:dev
# production mode
$ yarn start:prod
# unit tests
$ yarn test
# e2e tests
$ yarn test:e2e
# test coverage
$ yarn test:cov
src
├── app.module.ts
├── controller
│ ├── app.controller.ts
│ ├── dto
│ │ ├── password-reset-token-request.dto.ts
│ │ ├── password-update-request.dto.ts
│ │ └── product.request.dto.ts
│ ├── password-reset.controller.ts
│ └── product.controller.ts
├── domain
│ ├── enum
│ │ └── redis-prefix-enum.ts
│ └── interface
│ ├── product.interface.ts
│ ├── redis.repository.interface.ts
│ └── reset.token.interface.ts
├── infrastructure
│ └── redis
│ ├── redis.client.factory.ts
│ ├── redis.module.ts
│ └── repository
│ └── redis.repository.ts
├── main.ts
└── service
├── app.service.ts
├── password-reset.service.ts
├── product.service.ts
└── redis.service.ts