# IrisAdminApi
**Repository Path**: helloworldgo/IrisAdminApi
## Basic Information
- **Project Name**: IrisAdminApi
- **Description**: iris 框架的后台api项目
- **Primary Language**: Go
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 1
- **Created**: 2020-04-26
- **Last Updated**: 2021-02-08
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
IrisAdmin
> 简单项目仅供学习,欢迎指点!
>
#### 演示地址
主分支:
[http://irisadminapi.snowlyg.com](http://irisadminapi.snowlyg.com)
blog 分支:
[http://www.snowlyg.com](http://www.snowlyg.com)
[IRIS V12 中文文档](https://www.snowlyg.com/chapter/1)
账号/密码 : username/123456
###### `Iris-go` 学习交流 QQ 群 :`676717248`
---
#### 项目开发过程详解
1.[Iris-go 项目登陆 API 构建细节实现过程](https://www.snowlyg.com/#/detail/1)
2.[iris + casbin 从陌生到学会使用的过程](https://www.snowlyg.com/#/detail/2)
---
- 安装项目依赖
>加载依赖管理包 (解决国内下载依赖太慢问题)
>使用国内七牛云的 go module 镜像。
>
>参考 https://github.com/goproxy/goproxy.cn。
>
>阿里: https://mirrors.aliyun.com/goproxy/
>
>官方: https://goproxy.io/
>
>中国:https://goproxy.cn
>
>其他:https://gocenter.io
##### golang 1.13+ 可以直接执行:
```shell script
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct
```
- 复制配置文件
```
cp application.example.yml application.yml
```
> 修改配置文件 `application.yml`
- 运行项目
>如果想使用 `go run main.go --config ` 命令运行,注意不用 --config 指定配置路径,将无法加载配置文件
```
go run main.go --config your_config_path
```
>推荐使用 air 热编译工具
```
# 安装工具 air
go get -u github.com/cosmtrek/air
cp .air.example.conf .air.conf # 复制后修改 .air.conf 文件,默认为 mac 环境
air
```
- 填充数据, 注意配置文件同项目配置文件,权限数据位于 tools/seed/data
```
go build -o seed tools/seed/main.go
./seed --config your_config_path --path youer_seed_data_path
```
#### postman 接口
```text
https://www.getpostman.com/collections/048078cdfd16667352b0
```
#### 运行测试
```
go test ./...
```
#### 感谢
[JetBrains](https://www.jetbrains.com/?from=IrisAdminApi) 对本项目的支持。