Skip to content

Commit c91d698

Browse files
brooksyangclaude
andcommitted
docs: extract shared config section in getting started guide
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 31ca880 commit c91d698

File tree

2 files changed

+20
-92
lines changed

2 files changed

+20
-92
lines changed

docs/en/guide/getting-started.md

Lines changed: 10 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,16 @@ description: Quickly create a Bingo Go microservices project using bingoctl in 1
77

88
This guide will help you launch a Bingo project and run your first API within 10 minutes.
99

10-
## Option 1: Create Project with bingoctl (Recommended)
10+
## Create Project
1111

12-
Using the [bingoctl](https://github.com/bingo-project/bingoctl) CLI tool is the fastest way to create a Bingo project.
12+
### Option 1: Using bingoctl (Recommended)
1313

14-
### 1. Install bingoctl
14+
Using the [bingoctl](https://github.com/bingo-project/bingoctl) CLI tool is the fastest way to create a Bingo project.
1515

1616
```bash
17+
# Install bingoctl
1718
go install github.com/bingo-project/bingoctl@latest
18-
```
1919

20-
### 2. Create Project
21-
22-
```bash
2320
# Create a new project
2421
bingoctl create github.com/myorg/myapp
2522

@@ -33,47 +30,18 @@ bingoctl will automatically generate a complete project structure, including:
3330
- Makefile
3431
- Example code
3532

36-
### 3. Configure Services
37-
38-
Copy example configuration files to project root:
39-
40-
```bash
41-
cp configs/*.example.yaml .
42-
# Rename config files (remove .example suffix)
43-
for f in *.example.yaml; do mv "$f" "${f%.example.yaml}.yaml"; done
44-
```
45-
46-
Edit configuration files to set MySQL and Redis connection:
47-
48-
```yaml
49-
# myapp-apiserver.yaml
50-
mysql:
51-
host: 127.0.0.1:3306
52-
username: root
53-
password: your-password
54-
database: myapp
55-
56-
redis:
57-
host: 127.0.0.1:6379
58-
password: ""
59-
```
60-
61-
After configuration, continue to [Build and Run](#build-and-run) section.
62-
63-
---
64-
65-
## Option 2: Clone Bingo Repository
33+
### Option 2: Clone Bingo Repository
6634

6735
If you want to develop based on Bingo source code:
6836

69-
### 1. Clone Project
70-
7137
```bash
7238
git clone https://github.com/bingo-project/bingo.git
7339
cd bingo
7440
```
7541

76-
### 2. Configure Services
42+
---
43+
44+
## Configure Services
7745

7846
Copy example configuration files to project root:
7947

@@ -86,26 +54,22 @@ for f in *.example.yaml; do mv "$f" "${f%.example.yaml}.yaml"; done
8654
Edit configuration files to set MySQL and Redis connection:
8755

8856
```yaml
89-
# bingo-apiserver.yaml
57+
# <app>-apiserver.yaml
9058
mysql:
9159
host: 127.0.0.1:3306
9260
username: root
9361
password: your-password
94-
database: bingo
62+
database: your-database
9563

9664
redis:
9765
host: 127.0.0.1:6379
9866
password: ""
9967
```
10068
101-
After configuration, continue to [Build and Run](#build-and-run) section.
102-
10369
---
10470
10571
## Build and Run
10672
107-
The following steps are the same regardless of which method you used to create the project.
108-
10973
### 1. Build Project
11074
11175
```bash

docs/zh/guide/getting-started.md

Lines changed: 10 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,16 @@ description: 使用 bingoctl 快速创建 Bingo Go 微服务项目,10分钟内
77

88
本指南将帮助你在 10 分钟内启动 Bingo 项目并运行第一个 API。
99

10-
## 方式一: 使用 bingoctl 创建项目(推荐)
10+
## 创建项目
1111

12-
使用 [bingoctl](https://github.com/bingo-project/bingoctl) CLI 工具是创建 Bingo 项目最快的方式。
12+
### 方式一: 使用 bingoctl(推荐)
1313

14-
### 1. 安装 bingoctl
14+
使用 [bingoctl](https://github.com/bingo-project/bingoctl) CLI 工具是创建 Bingo 项目最快的方式。
1515

1616
```bash
17+
# 安装 bingoctl
1718
go install github.com/bingo-project/bingoctl@latest
18-
```
1919

20-
### 2. 创建项目
21-
22-
```bash
2320
# 创建新项目
2421
bingoctl create github.com/myorg/myapp
2522

@@ -33,47 +30,18 @@ bingoctl 会自动生成完整的项目结构,包括:
3330
- Makefile
3431
- 示例代码
3532

36-
### 3. 配置服务
37-
38-
复制示例配置文件到项目根目录:
39-
40-
```bash
41-
cp configs/*.example.yaml .
42-
# 重命名配置文件(去掉 .example 后缀)
43-
for f in *.example.yaml; do mv "$f" "${f%.example.yaml}.yaml"; done
44-
```
45-
46-
编辑配置文件,修改 MySQL 和 Redis 连接信息:
47-
48-
```yaml
49-
# myapp-apiserver.yaml
50-
mysql:
51-
host: 127.0.0.1:3306
52-
username: root
53-
password: your-password
54-
database: myapp
55-
56-
redis:
57-
host: 127.0.0.1:6379
58-
password: ""
59-
```
60-
61-
完成配置后,继续 [构建和运行](#构建和运行) 部分。
62-
63-
---
64-
65-
## 方式二: 克隆 Bingo 仓库
33+
### 方式二: 克隆 Bingo 仓库
6634

6735
如果你想基于 Bingo 源码进行开发:
6836

69-
### 1. 克隆项目
70-
7137
```bash
7238
git clone https://github.com/bingo-project/bingo.git
7339
cd bingo
7440
```
7541

76-
### 2. 配置服务
42+
---
43+
44+
## 配置服务
7745

7846
复制示例配置文件到项目根目录:
7947

@@ -86,26 +54,22 @@ for f in *.example.yaml; do mv "$f" "${f%.example.yaml}.yaml"; done
8654
编辑配置文件,修改 MySQL 和 Redis 连接信息:
8755

8856
```yaml
89-
# bingo-apiserver.yaml
57+
# <app>-apiserver.yaml
9058
mysql:
9159
host: 127.0.0.1:3306
9260
username: root
9361
password: your-password
94-
database: bingo
62+
database: your-database
9563

9664
redis:
9765
host: 127.0.0.1:6379
9866
password: ""
9967
```
10068
101-
完成配置后,继续 [构建和运行](#构建和运行) 部分。
102-
10369
---
10470
10571
## 构建和运行
10672
107-
无论使用哪种方式创建项目,以下步骤都是相同的。
108-
10973
### 1. 构建项目
11074
11175
```bash

0 commit comments

Comments
 (0)