docs📝: fix the init command's config name and add a SQLite quick start

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.
This commit is contained in:
zhangwenjian
2026-10-02 09:47:10 +08:00
parent 3ee8e2dd64
commit fb5a725a24
4 changed files with 68 additions and 8 deletions
+17 -2
View File
@@ -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进行调试
+17 -2
View File
@@ -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 からデバッグ実行することもできます
+17 -2
View File
@@ -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
+17 -2
View File
@@ -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 進行除錯