From fb5a725a2443723d57c3bf5c74d3ef1f00935cf0 Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Fri, 2 Oct 2026 09:47:10 +0800 Subject: [PATCH] =?UTF-8?q?docs=F0=9F=93=9D:=20fix=20the=20init=20command'?= =?UTF-8?q?s=20config=20name=20and=20add=20a=20SQLite=20quick=20start?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The README told readers to run `migrate -c config/settings.dev.yml`, a file that does not exist; the command stops with "no such file or directory". Point it at config/settings.yml, in all four READMEs. The default config needs a MySQL server, so there was no way to see the project running without installing one first. Add a short SQLite quick start at the top of the startup section: three commands, the build tag a plain `go build` leaves out, and the default account. --- README.Zh-cn.md | 19 +++++++++++++++++-- README.ja-JP.md | 19 +++++++++++++++++-- README.md | 19 +++++++++++++++++-- README.zh-TW.md | 19 +++++++++++++++++-- 4 files changed, 68 insertions(+), 8 deletions(-) diff --git a/README.Zh-cn.md b/README.Zh-cn.md index ede3ce97..6eb67e21 100644 --- a/README.Zh-cn.md +++ b/README.Zh-cn.md @@ -136,6 +136,21 @@ git clone https://github.com/go-admin-team/go-admin-ui.git ### 启动说明 +#### SQLite 快速体验(无需安装数据库) + +这是看到 go-admin 跑起来的最短路径。需要 C 编译器(cgo),并且要带 `sqlite3` 构建标签,普通的 `go build` 不包含它。 + +```bash +cd ./go-admin +go build -tags sqlite3 -o go-admin . +./go-admin migrate -c config/settings.sqlite.yml +./go-admin server -c config/settings.sqlite.yml +``` + +Windows 下把 `./go-admin` 换成 `go-admin.exe`。启动后接口地址是 `http://localhost:8000`。要打开界面,在 `go-admin-ui` 里执行 `pnpm install` 和 `pnpm dev`,然后用 `admin` / `123456` 登录。 + +使用 MySQL、PostgreSQL 或 SQL Server 时,请按下面的步骤操作。 + #### 服务端启动说明 ```bash @@ -181,10 +196,10 @@ cgo: exec gcc: exec: "gcc": executable file not found in %PATH% ``` bash # 首次配置需要初始化数据库资源信息 # macOS or linux 下使用 -$ ./go-admin migrate -c config/settings.dev.yml +$ ./go-admin migrate -c config/settings.yml # ⚠️注意:windows 下使用 -$ go-admin.exe migrate -c config/settings.dev.yml +$ go-admin.exe migrate -c config/settings.yml # 启动项目,也可以用IDE进行调试 diff --git a/README.ja-JP.md b/README.ja-JP.md index f02eba09..7393f604 100644 --- a/README.ja-JP.md +++ b/README.ja-JP.md @@ -136,6 +136,21 @@ git clone https://github.com/go-admin-team/go-admin-ui.git ### 起動方法 +#### SQLite でとりあえず動かす(データベースのインストール不要) + +go-admin が動くところまでの最短手順です。C コンパイラ(cgo)と `sqlite3` ビルドタグが必要で、通常の `go build` にはタグが含まれません。 + +```bash +cd ./go-admin +go build -tags sqlite3 -o go-admin . +./go-admin migrate -c config/settings.sqlite.yml +./go-admin server -c config/settings.sqlite.yml +``` + +Windows では `./go-admin` を `go-admin.exe` に置き換えてください。起動後の API は `http://localhost:8000` です。画面を開くには `go-admin-ui` で `pnpm install` と `pnpm dev` を実行し、`admin` / `123456` でログインします。 + +MySQL、PostgreSQL、SQL Server を使う場合は、以下の手順に従ってください。 + #### サーバーの起動 ```bash @@ -181,10 +196,10 @@ cgo: exec gcc: exec: "gcc": executable file not found in %PATH% ``` bash # 初回はデータベースのリソース情報を初期化する必要があります # macOS または linux の場合 -$ ./go-admin migrate -c config/settings.dev.yml +$ ./go-admin migrate -c config/settings.yml # ⚠️注意: windows の場合 -$ go-admin.exe migrate -c config/settings.dev.yml +$ go-admin.exe migrate -c config/settings.yml # プロジェクトを起動します。IDE からデバッグ実行することもできます diff --git a/README.md b/README.md index 87faae68..ec90feae 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,21 @@ git clone https://github.com/go-admin-team/go-admin-ui.git ### Startup instructions +#### Quick start with SQLite (nothing to install) + +This is the shortest way to see go-admin running. It needs a C compiler (cgo) and the `sqlite3` build tag, which a plain `go build` does not include. + +```bash +cd ./go-admin +go build -tags sqlite3 -o go-admin . +./go-admin migrate -c config/settings.sqlite.yml +./go-admin server -c config/settings.sqlite.yml +``` + +On Windows, use `go-admin.exe` instead of `./go-admin`. The API is then at `http://localhost:8000`. To open the UI, run `pnpm install` and `pnpm dev` in `go-admin-ui`, then sign in with `admin` / `123456`. + +For MySQL, PostgreSQL or SQL Server, follow the steps below instead. + #### Server startup instructions ```bash @@ -178,10 +193,10 @@ cgo: exec gcc: exec: "gcc": executable file not found in %PATH% ``` bash # The first configuration needs to initialize the database resource information # Use under macOS or linux -$ ./go-admin migrate -c config/settings.dev.yml +$ ./go-admin migrate -c config/settings.yml # ⚠️Note: Use under windows -$ go-admin.exe migrate -c config/settings.dev.yml +$ go-admin.exe migrate -c config/settings.yml # Start the project, you can also use the IDE for debugging # Use under macOS or linux diff --git a/README.zh-TW.md b/README.zh-TW.md index e6971264..080213c0 100644 --- a/README.zh-TW.md +++ b/README.zh-TW.md @@ -136,6 +136,21 @@ git clone https://github.com/go-admin-team/go-admin-ui.git ### 啟動說明 +#### SQLite 快速體驗(無需安裝資料庫) + +這是看到 go-admin 跑起來的最短路徑。需要 C 編譯器(cgo),並且要帶 `sqlite3` 建置標籤,一般的 `go build` 不包含它。 + +```bash +cd ./go-admin +go build -tags sqlite3 -o go-admin . +./go-admin migrate -c config/settings.sqlite.yml +./go-admin server -c config/settings.sqlite.yml +``` + +Windows 下把 `./go-admin` 換成 `go-admin.exe`。啟動後 API 位址是 `http://localhost:8000`。要開啟介面,在 `go-admin-ui` 中執行 `pnpm install` 與 `pnpm dev`,然後用 `admin` / `123456` 登入。 + +使用 MySQL、PostgreSQL 或 SQL Server 時,請依下面的步驟操作。 + #### 伺服器端啟動說明 ```bash @@ -181,10 +196,10 @@ cgo: exec gcc: exec: "gcc": executable file not found in %PATH% ``` bash # 首次設定需要初始化資料庫資源資訊 # macOS or linux 下使用 -$ ./go-admin migrate -c config/settings.dev.yml +$ ./go-admin migrate -c config/settings.yml # ⚠️注意:windows 下使用 -$ go-admin.exe migrate -c config/settings.dev.yml +$ go-admin.exe migrate -c config/settings.yml # 啟動專案,也可以用 IDE 進行除錯