Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/michaljalowik/node_boila

Node boilerplate app
https://github.com/michaljalowik/node_boila

ci crud docker docker-compose jest nestjs psql swagger typeorm

Last synced: 5 days ago
JSON representation

Node boilerplate app

Awesome Lists containing this project

README

        


Wire Edge Logo

[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest

Node.js boilerplate repo with: NestJs, Rest, GraphQL, TypeORM(Psql), Jest, Docker, Docker-Compose.


## Description

[Nest](https://github.com/nestjs/nest) based framework TypeScript starter repository.

## Installation and run
1. npm
```bash
$ npm ci
```
2. build
```bash
$ npm run build
```
3. run api -> from /docker dir
```bash
$ docker-compose up api
```
4. run swagger
```http
localhost:3000/swagger
```

## Migrations
Generate migrations:
1. go into /docker dir
2. go inside api container
```bash
$ docker-compose exec api bash
```
3. run migration:generate command to update db schema
```bash
$ npm run typeorm migration:generate src/migrations/
```
4. you can manually run migrations (migration:run command) but nestjs is set to runs automaticaly
```bash
$ npm run typeorm migration:run
```

## Swagger
Swagger config added to nestJs app
```http
/swagger
```

## Test
from /docker dir
```bash
# unit tests
$ docker-compose run test-runner
```

## License

[MIT licensed](LICENSE).