# 提供API服务的后端基础模板 **Repository Path**: init-project-base/backend-basic-code ## Basic Information - **Project Name**: 提供API服务的后端基础模板 - **Description**: 给前端提供的API数据管理的后端基础模板 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-03-04 - **Last Updated**: 2025-03-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 目录结构 * service --- 文件夹 * main.go --- 入口文件 * config.yaml --- 配置文件 * modules --- 数据库模型 * router --- 路由文件 * controller --- 返回控制器 * middleware --- 中间件(处理中间验证过程 * utils --- 工具库 * logs --- 日志文件[README.md](README.md) * components --- 第三方注册 * # 技术选用 1. gin --- 基于gin来搭建服务器 2. gorm/mysql --- 和数据库交互 3. jwt --- 生成验证的token 4. viper --- 读取配置文件 > 文件分类需要该改 打包: `CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o carpc main.go` ---