# backend_web_server **Repository Path**: peer_teach/backend_web_server ## Basic Information - **Project Name**: backend_web_server - **Description**: 友人教 server 端 - **Primary Language**: Go - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-06-04 - **Last Updated**: 2025-07-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## server项目结构 ```shell ├── api │   └── v1 ├── config ├── core ├── docs ├── global ├── initialize │   └── internal ├── middleware ├── model │   ├── request │   └── response ├── packfile ├── resource │   ├── excel │   ├── page │   └── template ├── router ├── service ├── source └── utils ├── timer └── upload ``` | 文件夹 | 说明 | 描述 | | ------------ | ----------------------- | --------------------------- | | `api` | api层 | api层 | | `--v1` | v1版本接口 | v1版本接口 | | `config` | 配置包 | config.yaml对应的配置结构体 | | `core` | 核心文件 | 核心组件(zap, viper, server)的初始化 | | `docs` | swagger文档目录 | swagger文档目录 | | `global` | 全局对象 | 全局对象 | | `initialize` | 初始化 | router,redis,gorm,validator, timer的初始化 | | `--internal` | 初始化内部函数 | gorm 的 longger 自定义,在此文件夹的函数只能由 `initialize` 层进行调用 | | `middleware` | 中间件层 | 用于存放 `gin` 中间件代码 | | `model` | 模型层 | 模型对应数据表 | | `--request` | 入参结构体 | 接收前端发送到后端的数据。 | | `--response` | 出参结构体 | 返回给前端的数据结构体 | | `packfile` | 静态文件打包 | 静态文件打包 | | `resource` | 静态资源文件夹 | 负责存放静态文件 | | `--excel` | excel导入导出默认路径 | excel导入导出默认路径 | | `--page` | 表单生成器 | 表单生成器 打包后的dist | | `--template` | 模板 | 模板文件夹,存放的是代码生成器的模板 | | `router` | 路由层 | 路由层 | | `service` | service层 | 存放业务逻辑问题 | | `source` | source层 | 存放初始化数据的函数 | | `utils` | 工具包 | 工具函数封装 | | `--timer` | timer | 定时器接口封装 | | `--upload` | oss | oss接口封装 | ======= # backend_web_server #### 介绍 友人教 server 端 #### 软件架构 软件架构说明 #### 安装教程 1. xxxx 2. xxxx 3. xxxx #### 使用说明 1. xxxx 2. xxxx 3. xxxx #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) #### RPC ``` cd /peer_teach/backend_web_server/protocol protoc --go_out=./pb --go_opt=paths=source_relative --go-grpc_out=./pb --go-grpc_opt=paths=source_relative ./proto/logic.int.proto ``` ### 部署方式 #### 1. IM ``` cd im sh run.sh 或 cd cmd/connect go run main.go cd cmd/logic go run main.go cd cmd/business go run main.go ``` #### 2. backend ``` cd backend make start 或 make restart ```