@lava-x/nest-cli
v3.0.20
Published
NestJs scaffolding cli from Lava X
Downloads
11
Readme
LxNestGenerator
NestJs automation cli from Lava X
Available features
- Enum generator
- module generator
- redis-cache generator
Getting started
# Install package
yarn add -D @lava-x/nest-cli
# Add the this line under the scripts section in package.json file
"generate": "./node_modules/.bin/plop --plopfile ./node_modules/@lava-x/nest-cli/dist/generate/index.js",
# Run the generator
yarn generate
Guide
Enum generator
- generates enum which also registers to graphql
Enum name: order-status
Module generator
- Prompts 2 types of modules (with-nest-query & without-nest-query)
- with-nest-query : Builds module with nest-query package (automated CRUD resolvers).
- without-nest-query : Builds module without nest-query package.
- with-relation : If the module has relationship such as (ManyToOne, OneToMany, OneToOne, ManyToMany) with other modules.
- without-relation : If the module has no relationship with other modules (stand-alone).
- Does the module needs customized services? : If the module needs additional business logic service, (yes,no).
- Does the Relation Module exist? : If the relation module exists in the src/modules directory. (yes,no)
Redis-module generator
- Uses the Cache module from the Nestjs and takes advantage by using 3rd-party stores. Ex: Redis.
- Sets up the redis module into the project.