Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielLiu1123 committed Sep 20, 2024
1 parent a8e9d03 commit deb57c3
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
# Gencoder

The ultimate code generator for any languages/frameworks.
A code generator for any languages/frameworks.

Applicable scenarios for gencoder:

- You need to modify the generated code and the modified code will not be overwritten
- High customization requirements for generated code

## Build
## Install

```bash
make && CGO_ENABLED=0 go build -o gencoder cmd/gencoder/main.go
go install github.com/DanielLiu1123/gencoder/cmd/gencoder
```

## Quick Start

```shell
docker rm -f test_mysql && docker run --name test_mysql -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=testdb -p 3306:3306 -p 33060:33060 -id mysql:latest && sleep 10 && docker exec -i test_mysql mysql -uroot -proot -e "\
CREATE TABLE testdb.user ( \
id INT AUTO_INCREMENT PRIMARY KEY, \
username VARCHAR(64) NOT NULL COMMENT 'Username, required', \
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'Record creation timestamp' \
) COMMENT='User account information';"
```

If you updated Handlebars.js version or added new helpers in `pkg/jsruntime/helpers.js`:
```bash
go generate ./...
```
gencoder init
```

```bash
gencoder generate
```

0 comments on commit deb57c3

Please sign in to comment.