Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 716 Bytes

README.md

File metadata and controls

34 lines (24 loc) · 716 Bytes

Schematics for NestJS REST API resources

This package generates opinionated NestJS REST API resources. Key takeaways:

  • Uses Prisma Service (nestjs-prisma needs to be installed separately)
    • Expects Prisma entities to have singular naming (e.g. User)
  • Uses Zod for DTO Validation (nestjs-zod needs to be installed separately)
  • Does not follow the NestJS naming convention (uses camelCase for the file names)

Installation

npm i --save-dev nest-cmdn-schematics

Usage

nest 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>