A progressive Node.js framework for building efficient and scalable server-side applications.
I created this api to server as a template nest js with DDD.
- Nest
- Prisma
- Swagger
$ yarn install
# Database
DATABASE_HOST=localhost
DATABASE_PORT=5432
DATABASE_USER=postgres
DATABASE_PASS=root
DATABASE_NAME=nest_template_prisma
DATABASE_ROOT_PASSWORD=root
DATABASE_URL="postgresql://${DATABASE_USER}:${DATABASE_PASS}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}"
$ npx prisma dev
#APP
APP_NAME=nest-template-prisma-ddd
APP_PORT=3333
APP_VERSION=1.0.0
#JWT
JWT_SECRECT=DO-NOT-USE-THIS-VALUE
JWT_REFRESH_TOKEN_SECRECT=DO-NOT-USE-THIS-VALUE
# secunds
JWT_EXPIREIN=60
# development
$ yarn run start
# watch mode
$ yarn run start:dev
# production mode
$ yarn run start:prod
# Database
DATABASE_HOST=localhost
DATABASE_PORT=5432
DATABASE_USER=postgres
DATABASE_PASS=root
DATABASE_NAME=test_nest_template_prisma
# unit tests
$ yarn run test
# e2e tests
$ yarn run test:e2e
# test coverage
$ yarn run test:cov
# product build
$ yarn build
#Docker
DOCKER_ENV=local
# compose
$ docker-compose up
# build dockerfile
$ docker build -t nest_template_api -f .docker/Dockerfile.{DOCKER_ENV} .
Acesse o endereço: http://localhost:{PORT}/api/docs
.
├─ 📁 prisma
├─ 📁 src
│ ├── 📁 configs
│ ├── 📁 core
│ │ ├─ 📁 domain
│ │ └─ 📁 logic
│ ├── 📁 domain
│ │ ├─ 📁 entities
│ │ ├─ 📁 services
│ │ ├─ 📁 use-cases
│ │ └─ 📁 values-objects
│ └── 📁 infra
│ ├─ 📁 database
│ │ ├─ 📁 prisma
│ │ └─ 📁 repositories
│ ├─ 📁 http
│ │ ├─ 📁 auth
│ │ ├─ 📁 controllers
│ │ ├─ 📁 services
│ │ └─ 📁 view-models
│ └─ 📁 logger
└─ 📁 teste
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
- Author - Raul Silva
Nest is MIT licensed.