1 Star 0 Fork 182

rogerlo / gin-admin

forked from Lyric / gin-admin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Gin-Admin

基于Gin + Casbin + Ant Design React 的RBAC权限管理脚手架

screenshot

1. 快速开始

1.1 开发环境依赖

  • go 1.11+
  • node 8.12.0+
  • yarn 1.12.3+

1.2 获取代码及初始化

1.2.1 拉取代码

如果github源太慢,可以拉取国内源:https://gitee.com/lyric/gin-admin.git

git clone https://github.com/LyricTian/gin-admin.git $GOPATH/src/github.com/LyricTian/gin-admin

1.2.2 更改数据库配置

编辑$GOPATH/src/github.com/LyricTian/gin-admin/config/config.toml配置文件,更改如下配置

# mysql数据库配置
[mysql]

# 连接地址(格式:127.0.0.1:3306)
addr = "127.0.0.1:3306"
# 用户名
username = "root"
# 密码
password = "123456"
# 数据库
database = "ginadmin"

1.2.3 创建数据库

CREATE DATABASE `ginadmin` DEFAULT CHARACTER SET = `utf8mb4`;

1.2.4 初始化数据

  • 初始化菜单数据:$GOPATH/src/github.com/LyricTian/gin-admin/script/init_menu.sql

1.3 编译并运行

cd $GOPATH/src/github.com/LyricTian/gin-admin

1.3.1 编译并运行服务

cd cmd/server
go build -o server
./server -c ../../config/config.toml -m ../../config/model.conf

1.3.2 编译并运行前端

cd web
yarn
yarn start

1.3.3 用户登录

在配置文件中可设定`system_root_user`配置项指定用户名及密码,默认用户名为:root,密码为:123

感谢以下框架的开源支持

MIT License

Copyright (c) 2018 Lyric
MIT License Copyright (c) 2018 Lyric Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

基于Gin + Casbin + Ant Design React的RBAC权限管理脚手架 展开 收起
Go
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Go
1
https://gitee.com/xlite/gin-admin.git
git@gitee.com:xlite/gin-admin.git
xlite
gin-admin
gin-admin
master

搜索帮助