Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/patrickniyogitare28/super-nest
A nestjs boiler plate with preconfigured typeorm for postgresql, swagger, dockerfile, eslint, prettier & jest
https://github.com/patrickniyogitare28/super-nest
boilerplate dockerfile eslint jest jest-tests nestjs postgresql prettier swagger typeorm
Last synced: about 1 month ago
JSON representation
A nestjs boiler plate with preconfigured typeorm for postgresql, swagger, dockerfile, eslint, prettier & jest
- Host: GitHub
- URL: https://github.com/patrickniyogitare28/super-nest
- Owner: PatrickNiyogitare28
- Created: 2021-11-25T09:25:19.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-24T12:56:59.000Z (almost 3 years ago)
- Last Synced: 2024-10-15T03:53:06.436Z (3 months ago)
- Topics: boilerplate, dockerfile, eslint, jest, jest-tests, nestjs, postgresql, prettier, swagger, typeorm
- Language: TypeScript
- Homepage:
- Size: 109 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nestjs Typeorm Complite Boiler Plate
The complete nestjs boiler plate that uses `typeorm` for postgresql mapping.
## Quick start- Clone the repo
- Make copy of `.env.example` with db configuration credentials.## Running services
- Run `yarn start:dev` to run dev server
- Run `yarn migration:generate -- ` to generate new migration
- Run `yarn migration:run` to run migration
- Run `yarn schema:drop` to reset the db schemas
- Run `yarn seed:run` to run seeds## Running the documentation
The template contains a pre-configured swagger-ui documentation accessed over `localhost:3000/docs`
## Installation```bash
$ npm install
```Ensure also that [Docker is installed](https://docs.docker.com/engine/install) on your work station
## Running the app using node server (the normal way)
```bash
# development
$ npm run start:dev
or
nest start# Debug/watch
$ npm run start:debug# production
$ npm run build:prod
$ npm start
```## Using Docker
```sh
# Build the image
$ docker build -t nest-boiler-plate:v1.0 .# Run the image interactively
$ docker run -it -p 3000:3000 nest-boiler-plate:v1.0
$ docker rmi -f $(docker images -a -q)
```## Using Docker Compose
```sh
# Build the docker image
$ docker-compose build# Start and login to the container
$ docker-compose up -d
$ docker-compose exec app sh
```## Other useful Docker commands
```sh
# Get the container ID
$ docker ps# View logs
$ docker logs# Enter the container (In alpine, use sh because bash is not installed by default)
$ docker exec -it /bin/sh
```## Testing
```bash
# unit tests
$ npm run test# e2e tests
$ npm run test:e2e# test coverage
$ npm run test:cov
```