Coder Social home page Coder Social logo

rarpainting / gin-admin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lyrictian/gin-admin

0.0 2.0 0.0 8.2 MB

RBAC scaffolding based on Gin + Casbin + Ant Design React

Home Page: https://demo.tiannianshou.com

License: MIT License

Makefile 0.29% Go 52.36% JavaScript 43.29% CSS 3.92% HTML 0.13%

gin-admin's Introduction

Gin-Admin

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

screenshot

1. 快速开始

1.1 开发环境依赖

  • go 1.10+
  • 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.