# Description

The gadmin2 CLI is a command-line interface tool that helps you to initialize, develop, and maintain your gadmin2 applications. 

[Documents](https://ptc.coding.intlgame.com/p/gadmin2/wiki/1)

## Installation
```
$ yarn global add @gadmin2/cli@latest
```
Check CLI version
```
$ gadmin2 -v
```

## Usage

### Define data model
```
$ vi config/schema.prisma
```

### Change ui
```
$ vi config/ui.config.ts
```

### Generate code after edit config/schema.prisma or config/ui.config.ts
```
$ gadmin2 g prisma:dev  #Run prisma push db first. Command "gadmin2 g prisma" without run "prisma push db"
```

### Start web DevServer
```
$ cd web
$ yarn #run once if dependancies installed failed
$ yarn dev
```

### Start server(nestjs) DevServer
```
$ cd server
$ yarn #run once if dependancies installed failed
$ yarn start:dev
```
About nestjs server [read more](https://ptc.coding.intlgame.com/p/gadmin2/d/schematics/git/tree/master/src/lib/application/files/server/nest/README.md)

## License
Gadmin2 is [MIT licensed](LICENSE).