Version: 0.0.0
Example application with PM2, docker-compose, postgres and prisma
git clone https://github.com/nestjs-mod/nestjs-mod-contrib.git
cd nestjs-mod-contrib
npm install
# preparing code, building code, creating infrastructure documentation and all the files necessary to raise the infrastructure and running tests (generate, build, docs:infrastructure, test)
npm run manual:prepare
# running the docker-compose infrastructure for prisma
npm run docker-compose:start:prisma
# creation all databases of applications and modules
npm run db:create
# applying migrations for example-prisma
npm run prisma:migrate-deploy:example-prisma
# running example-prisma application source code in watch mode
npm run serve:dev:example-prisma
# preparing code, building code, creating infrastructure documentation and all the files necessary to raise the infrastructure and running tests (generate, build, docs:infrastructure, test)
npm run manual:prepare
# running the docker-compose infrastructure for prisma
npm run docker-compose:start:prisma
# creation all databases of applications and modules
npm run db:create
# applying migrations for example-prisma
npm run prisma:migrate-deploy:example-prisma
# launching example-prisma application (you must first build it using the build command)
npm run start:prod:example-prisma
# running tests for example-prisma
npm run test:example-prisma
Utilities for setting global application parameters, such as project name, description, and settings validation parameters.
WrapApplicationOptionsService
, DotEnvService
, PackageJsonService
, ApplicationPackageJsonService
, GitignoreService
, NxProjectJsonService
, ProjectUtilsPatcherService
Key | Constraints | Value |
---|---|---|
applicationPackageJsonFile |
optional | /home/endy/Projects/nestjs-mod/nestjs-mod-contrib/apps/example-prisma/package.json |
packageJsonFile |
optional | /home/endy/Projects/nestjs-mod/nestjs-mod-contrib/package.json |
envFile |
optional | /home/endy/Projects/nestjs-mod/nestjs-mod-contrib/.env |
Default NestJS application initializer.
Key | Constraints | Value |
---|---|---|
bufferLogs |
optional | true |
Pino logger for NestJS-mod (Wrapper for https://www.npmjs.com/package/nestjs-pino)
Terminus integration provides readiness/liveness health checks for NestJS-mod (Wrapper for https://www.npmjs.com/package/@nestjs/terminus)
TerminusHealthCheckService
TerminusModule
Key | Constraints | Value |
---|---|---|
standardHealthIndicators |
optional | [ {"name":"memory_heap"} ] |
Next-generation Node.js and TypeScript ORM for NestJS-mod (preview version only for Postgres)
PrismaClientFactoryService
, PrismaClient
Key | Sources | Constraints | Value |
---|---|---|---|
databaseUrl |
obj['databaseUrl'] , process.env['PRISMA_PRISMA_USER_DATABASE_URL'] |
isNotEmpty (databaseUrl should not be empty) | postgres://prisma_user:prisma_user_password@localhost:5432/prisma_user?schema=public |
Key | Constraints | Value |
---|---|---|
prismaModule |
optional | {} |
featureName |
optional | prisma-user |
schemaFile |
optional | /home/endy/Projects/nestjs-mod/nestjs-mod-contrib/apps/example-prisma/src/prisma/prisma-user-schema.prisma |
binaryTargets |
optional | [ native , linux-musl-openssl-3.0.x , linux-musl-openssl-3.0.x ] |
Default NestJS application listener.
Key | Sources | Constraints | Value |
---|---|---|---|
port |
obj['port'] , process.env['PRISMA_PORT'] |
optional | 3003 |
hostname |
obj['hostname'] , process.env['PRISMA_HOSTNAME'] |
optional | - |
Key | Constraints | Value |
---|---|---|
mode |
optional | silent |
Docker Compose is a tool for defining and running multi-container applications. It is the key to unlocking a streamlined and efficient development and deployment experience. (Generator docker-compose.yml for https://docs.docker.com/compose)
ManualDockerComposeFeatures
Key | Constraints | Value |
---|---|---|
dockerComposeFile |
isNotEmpty (dockerComposeFile should not be empty) | /home/endy/Projects/nestjs-mod/nestjs-mod-contrib/apps/example-prisma/docker-compose.yml |
Key | Constraints | Value |
---|---|---|
services |
optional | {"prisma-postgre-sql":{"image":"bitnami/postgresql:15.5.0","container_name":"prisma-postgre-sql","volumes":["prisma-postgre-sql-volume:/bitnami/postgresql"],"ports":["5432:5432"],"networks":["prisma-network"],"healthcheck":{"test":["CMD-SHELL","pg_isready -U postgres"],"interval":"5s","timeout":"5s","retries":5},"tty":true,"restart":"always"}} |
networks |
optional | {"prisma-network":{"driver":"bridge"}} |
volumes |
optional | {"prisma-postgre-sql-volume":{"name":"prisma-postgre-sql-volume"}} |
Production process manager for Node.JS applications with a built-in load balancer for NestJS-mod (Generator ecosystem.config.json for https://www.npmjs.com/package/pm2)
Key | Constraints | Value |
---|---|---|
ecosystemConfigFile |
isNotEmpty (ecosystemConfigFile should not be empty) | /home/endy/Projects/nestjs-mod/nestjs-mod-contrib/ecosystem.config.json |
applicationScriptFile |
isNotEmpty (applicationScriptFile should not be empty) | dist/apps/example-prisma/main.js |
Infrastructure markdown report generator.
DynamicNestModuleMetadataMarkdownReportGenerator
Key | Constraints | Value |
---|---|---|
markdownFile |
optional | /home/endy/Projects/nestjs-mod/nestjs-mod-contrib/apps/example-prisma/INFRASTRUCTURE.MD |
skipEmptySettings |
optional | true |
style |
optional | pretty |
PostgreSQL (Postgres) is an open source object-relational database known for reliability and data integrity. ACID-compliant, it supports foreign keys, joins, views, triggers and stored procedures. (Generator for databases in docker-compose.yml for https://github.com/nestjs-mod/nestjs-mod-contrib/tree/master/libs/infrastructure/docker-compose)
Key | Sources | Constraints | Value |
---|---|---|---|
rootDatabaseUrl |
obj['rootDatabaseUrl'] , process.env['PRISMA_ROOT_DATABASE_URL'] |
isNotEmpty (rootDatabaseUrl should not be empty) | postgres://postgres:postgres_password@localhost:5432/postgres?schema=public |
Key | Sources | Constraints | Value |
---|---|---|---|
databaseUrl |
obj['databaseUrl'] , process.env['PRISMA_FEATURE_MODULE_NAME_DATABASE_URL'] |
isNotEmpty (databaseUrl should not be empty) | - |
Key | Sources | Constraints | Value |
---|---|---|---|
databaseUrl |
obj['databaseUrl'] , process.env['PRISMA_PRISMA_USER_DATABASE_URL'] |
isNotEmpty (databaseUrl should not be empty) | postgres://prisma_user:prisma_user_password@localhost:5432/prisma_user?schema=public |