Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/temirlan-zh/test-task-users-and-tasks

Implementation of a test task for a job application.
https://github.com/temirlan-zh/test-task-users-and-tasks

jest nestjs openapi postgresql rest-api typeorm typescript unit-testing

Last synced: 3 days ago
JSON representation

Implementation of a test task for a job application.

Awesome Lists containing this project

README

        

## Description

Implementation of a test task for a job application.

Technologies used:

- NestJS
- TypeORM
- PostgreSQL
- Jest

ESLint/Prettier run pre-commit by _husky_ and _lint-staged_.

Implemented _filtering_, _sorting_ and _paging_ when querying users.

Centralized error handling is implemented using [an exception filter](src/common/filters/all-exceptions.filter.ts).

Centralized request logging is implemented using [a middleware](src/common/middlewares/logger.middleware.ts).

API documentation is implemented using _OpenAPI_.

Email and password regex checking is implemented via [a DTO](src/users/dto/create-user.dto.ts).

## Installation

```bash
$ pnpm install
```

## Running the app

You should configure PostgreSQL connection settings in `.env` file.

```bash
# development
$ pnpm run start

# watch mode
$ pnpm run start:dev
```

## Test

```bash
# unit tests
$ pnpm run test
```