Giter VIP home page Giter VIP logo

admin's Introduction

beego admin . Build Status

基于beego,jquery ,bootstrap的一个后台管理系统

VERSION = "0.1.1"

获取安装

执行以下命令,就能够在你的GOPATH/src 目录下发现beego admin

$ go get github.com/beego/admin

#我仿照这个写的

配置文件

数据库目前仅支持MySQL,PostgreSQL,sqlite3,后续会添加更多的数据库支持。

数据库的配置信息需要填写,程序会根据配置自动建库 MySQL数据库链接信息

db_host = localhost
db_port = 3306
db_user = root
db_pass = root
db_name = admin
db_type = mysql

postgresql数据库链接信息

db_host = localhost
db_port = 5432
db_user = postgres
db_pass = postgres
db_name = admin
db_type = postgres
db_sslmode=disable

sqlite3数据库链接信息

###db_path 是指数据库保存的路径,默认是在项目的根目录
db_path = ./
db_name = admin
db_type = sqlite3

把以上信息配置成你自己数据库的信息。

还有一部分权限系统需要配置的信息

sessionon = true
rbac_user_table = user
rbac_role_table = role
rbac_power_table = power
rbac_role_power_table = role_power
rbac_user_role_table = user_role
rbac_login_log_table = login_log
#admin用户名 此用户登录不用认证
rbac_admin_user = admin

#默认不需要认证模块
not_auth_package = public,static
#默认认证类型 0 不认证 1 登录认证 2 实时认证
user_auth_type = 1
#默认登录网关
rbac_auth_gateway = /public/login
#默认模版
template_type=amz

#分页(自己运行发现出错,Handler crashed with error runtime error: makeslice: len out of range ,然后寻找问题,定位到分页的那,发现没有配置,,,尴尬)
pagesize=5

以上配置信息都需要加入admin/conf/app.conf的配置。

编译项目

全部做好了以后。就可以编译了,admin目录

$ go build

首次启动需要创建数据库、初始化数据库表。

$ ./admin -syncdb

好了,现在可以通过浏览器地址访问了http://localhost:8080/

默认得用户名密码都是admin

admin's People

Contributors

qingchunyibeifangzongle avatar

Watchers

James Cloos avatar

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.