Skip to content

Latest commit

 

History

History
92 lines (60 loc) · 2.39 KB

cli.md

File metadata and controls

92 lines (60 loc) · 2.39 KB

Command Line Interface (CLI)


Table of Contents


Generate resource

Generate resource with the following commands:

For document oriented database (MongoDB + Mongoose)

npm run generate:resource:document -- --name ResourceName

Example:

npm run generate:resource:document -- --name Category

For relational database (PostgreSQL + TypeORM)

npm run generate:resource:relational -- --name ResourceName

Example:

npm run generate:resource:relational -- --name Category

Video guideline for relational database (PostgreSQL + TypeORM)

nestjs-relational-resource-generator.mp4

For both databases

npm run generate:resource:all-db -- --name ResourceName

Example:

npm run generate:resource:all-db -- --name Category

Add property to resource

Property for document oriented database (MongoDB + Mongoose)

npm run add:property:to-document

Property for relational database (PostgreSQL + TypeORM)

npm run add:property:to-relational

Video guideline how to add property for relational database (PostgreSQL + TypeORM)

nestjs-relational-resource-generator-fields.mp4

Property for both databases

npm run add:property:to-all-db

Previous: Architecture

Next: Working with database