# orion **Repository Path**: weihao306/orion ## Basic Information - **Project Name**: orion - **Description**: 从零开始搭建的现代化 Go Web 服务端脚手架,基于 Gin 框架。 - **Primary Language**: Go - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-08-03 - **Last Updated**: 2025-12-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: selfcode ## README # orion 从零开始搭建的现代化 Go Web 服务端脚手架,基于 Gin 框架。 ## 技术栈 - Go 1.18+ - Gin - GORM: ORM 框架,支持 PostgreSQL、MySQL、SQLite - Redis: go-redis/v9 - Logrus: 日志框架 - Viper: 配置管理和热加载 ## 快速开始 1. `git clone` 本仓库并下载依赖 2. 配置 `config.yaml` 3. 启动服务 `go run main.go` ## 使用场景 - Web后端服务 - 微服务API - 项目原型 ## swagger 文档使用 1. 安装gin-swagger工具: `go install github.com/swaggo/swag/cmd/swag@latest` 2. 在项目根目录下运行命令:`swag init`, 若提示命令未找到,检查$GOPATH/bin是否在系统 PATH 环境变量中 3. 运行项目:`go run main.go` 4. 访问 `http://ip:port/swagger/index.html` *注意:新添加swagger注释后,需运行`swag init`重新生成文档* ## License This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details.