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

https://github.com/fuerback/nestjs-api

A simple NestJS REST API with Authorization
https://github.com/fuerback/nestjs-api

authorization docker docker-compose environment-variables logging nestjs swagger typeorm typescript unit-testing

Last synced: 5 months ago
JSON representation

A simple NestJS REST API with Authorization

Awesome Lists containing this project

README

          

# Task Manager REST API

## Description

A simple project for managing tasks using Nest as a web framework.

## Installation

Add the environments below to `.env` or export in your favorite bash file.

| Name | Value |
|-------------------|---------------------|
| PG_CONTAINER_NAME | postgres_task |
| POSTGRES_USER | tasks_admin |
| POSTGRES_PASSWORD | admingres |
| POSTGRES_DB | taskmanagement |
| PGDATA | /data/postgres-task |
| PG_HOST | db |
| PG_PORT | 5432 |
| APP_PORT | 3000 |

```bash
$ npm install
```

## Running the app

```bash
$ docker-compose up -d
```

## Endpoints

OpenAPI documentation [here](./swagger-api.yaml)

## Test

```bash
# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov
```

## TO-DO

- [ ] Add more unit tests
- [ ] Add integration tests
- [ ] Add more logs
- [ ] Add Redis
- [x] Add Swagger documentation

## License

Nest is [MIT licensed](LICENSE).