This package generates opinionated NestJS REST API resources. Key takeaways:
- Uses Prisma Service (
nestjs-prismaneeds to be installed separately)- Expects Prisma entities to have singular naming (e.g. User)
- Uses Zod for DTO Validation (
nestjs-zodneeds to be installed separately) - Does not follow the NestJS naming convention (uses camelCase for the file names)
npm i --save-dev nest-cmdn-schematicsnest g -c nest-cmdn-schematics crud <Resource Name>Or add npm alias
"scripts": {
"gen": "nest g crud -c nest-cmdn-schematics"
}And then use
npm run gen <Resource Name>