Files
x_admin/docs/server/准备.md
xiangheng 54c5ab5bc4 文档
2024-06-28 12:08:48 +08:00

33 lines
661 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 前期准备
后端
1. 安装 go
2. 安装 mysql
3. 安装 redis
4. 安装 git
5. 安装 swag: `go install github.com/swaggo/swag/cmd/swag@latest`
# 使用
### 1.下载项目
```bash
# 二选一
git clone git@gitee.com:xiangheng/x_admin.git
git clone git@github.com:adtkcn/x_admin.git
```
### 2.创建数据库并导入`x_admin/sql/`目录下 sql 文件
### 3.运行后端
1. 复制并重命名`x_admin/server/.env.example``x_admin/server/.env`文件,
2. `.env`必须配置 `mysql``redis` 信息。
```bash
cd x_admin/server
# 生成接口文档
swag init
# 运行, 在vscode中打开server目录中的文件按F5即可运行
go run .
```