Version: 0.0.0
A collection of modules unified for NestJS-mod
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 example-nats-microservice
npm run docker-compose:start:example-nats-microservice
# running example-nats-microservice source code in watch mode
npm run serve:dev:example-nats-microservice# 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 example-nats-microservice
npm run docker-compose:start:example-nats-microservice
# launching a built example-nats-microservice (you must first build it using the build command)
npm run start:prod:example-nats-microservice# running tests for example-nats-microservice
npm run test:example-nats-microserviceUtilities 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-nats-microservice/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 |
Nats NestJS-mod microservice initializer @see https://docs.nestjs.com/microservices/nats
| Key | Sources | Constraints | Value |
|---|---|---|---|
name |
obj['name'], process.env['EXAMPLE_NATS_MICROSERVICE_NATS_NAME'] |
optional | - |
user |
obj['user'], process.env['EXAMPLE_NATS_MICROSERVICE_NATS_USER'] |
optional | natsadmin |
pass |
obj['pass'], process.env['EXAMPLE_NATS_MICROSERVICE_NATS_PASS'] |
optional | 6EcbcW66JsKvFrY2bZw6QGKjHhefca7Kgpp1 |
servers |
obj['servers'], process.env['EXAMPLE_NATS_MICROSERVICE_NATS_SERVERS'] |
optional | [ nats://localhost:4222 ] |
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"} ] |
Default NestJS application listener.
| Key | Sources | Constraints | Value |
|---|---|---|---|
port |
obj['port'], process.env['EXAMPLE_NATS_MICROSERVICE_PORT'] |
optional | 5002 |
hostname |
obj['hostname'], process.env['EXAMPLE_NATS_MICROSERVICE_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-nats-microservice/docker-compose.yml |
| Key | Constraints | Value |
|---|---|---|
services |
optional | {"example-nats-microservice-nats":{"image":"bitnami/nats:2.10.5","container_name":"example-nats-microservice-nats","volumes":["example-nats-microservice-nats-volume:/bitnami/nats/data"],"ports":["8222:8222","4222:4222"],"networks":["example-nats-microservice-network"],"environment":{"NATS_ENABLE_AUTH":"yes","NATS_USERNAME":"natsadmin","NATS_PASSWORD":"6EcbcW66JsKvFrY2bZw6QGKjHhefca7Kgpp1","NATS_EXTRA_ARGS":"-js"},"keysOfEnvironmentsWithStaticValue":["featureName","image","extraArgs","networks"],"tty":true,"restart":"always"}} |
networks |
optional | {"example-nats-microservice-network":{"driver":"bridge"}} |
volumes |
optional | {"example-nats-microservice-nats-volume":{"name":"example-nats-microservice-nats-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-nats-microservice/main.js |
Infrastructure markdown report generator.
DynamicNestModuleMetadataMarkdownReportGenerator
| Key | Constraints | Value |
|---|---|---|
markdownFile |
optional | /home/endy/Projects/nestjs-mod/nestjs-mod-contrib/apps/example-nats-microservice/INFRASTRUCTURE.MD |
skipEmptySettings |
optional | true |
style |
optional | pretty |
NATS is an open source, lightweight and high-performance messaging system. It is ideal for distributed systems and supports modern cloud architectures and pub-sub, request-reply and queuing models. (Generator for nats in docker-compose.yml for https://www.npmjs.com/package/@nestjs-mod/docker-compose)
| Key | Sources | Constraints | Value |
|---|---|---|---|
natsEnableAuth |
obj['natsEnableAuth'], process.env['EXAMPLE_NATS_MICROSERVICE_NATS_MICROSERVICE_USER_NATS_ENABLE_AUTH'] |
optional | yes |
natsUsername |
obj['natsUsername'], process.env['EXAMPLE_NATS_MICROSERVICE_NATS_MICROSERVICE_USER_NATS_USERNAME'] |
optional | natsadmin |
natsPassword |
obj['natsPassword'], process.env['EXAMPLE_NATS_MICROSERVICE_NATS_MICROSERVICE_USER_NATS_PASSWORD'] |
optional | 6EcbcW66JsKvFrY2bZw6QGKjHhefca7Kgpp1 |
| Key | Constraints | Value |
|---|---|---|
featureName |
optional | nats-microservice-user |