Code Monkey home page Code Monkey logo

rust-admin's Introduction

基于Rust的后台管理系统

功能特点

前端基于X-admin、layui,用户众多、易于修改。

X-Admin: http://x.xuebingsi.com/

Layui: https://www.larryms.com/

后端基于actix-web开发,性能测试常年屠榜。

Actix框架: https://actix.rs/

性能测试: https://www.techempower.com/benchmarks/

MVC 设计模式,快速入门,方便上手。

Tera 模板引擎,layout、elements等简化开发。

Tera: https://tera.netlify.com/docs/

基于Rust语言特性,有性能、安全保证,先天优于Go/Java/.Net/Php等带GC语言。

二次开发 & 技术交流

QQ群: 1036231916

微信群, 扫码备注: rust 加入

avatar

环境要求

rust: 1.40+ / Mysql: 5.6+ / Nginx: 1.0+ (可选, 如果通过域名/80端口代理方式访问则需要)

目录说明

/public 用于设置nginx对外的网站地址

/scripts 用于初始化的sql脚本

/src rust源代码

/setting.toml.default 默认的配置文件, 请将复制为 setting.toml 并加入忽略

/templates 模板文件

/nginx.conf.default 设置nginx为前端代理的配置文件 (可选)

界面载图

登录界面

avatar

后台管理

avatar

菜单管理

avatar

使用说明

下载代码

git clone https://gitee.com/houhanting/rust-admin.git
cd rust-admin

创建数据库(Mysql)并入导入数据

/* 创建数据库 */
CREATE DATABASE rust_admin DEFAULT CHARSET=UTF8 COLLATE=UTF8_GENERAL_CI; 
/* 设置用户名称密码 */
GRANT ALL PRIVILEGES ON `rust_admin`.* to 'rust_admin'@'%' IDENTIFIED BY 'rust-x-lsl'; 
FLUSH PRIVILEGES;
/* 选中数据库 */
USE rust_admin; 
/* 导入初始化数据库(请依据实际路径) */
SOURCE scripts/init.sql; 

/** 以下非必须, 只有前端使用 rust-vlog 时才会用到 **/
/* 创建vlog示例数据库 */
CREATE DATABASE rust_vlog DEFAULT CHARSET=UTF8 COLLATE=UTF8_GENERAL_CI; 
/* 设置vlog用户名称密码 */
GRANT ALL PRIVILEGES ON `rust_vlog`.* to 'rust_vlog'@'%' IDENTIFIED BY 'rust-x-lsl'; 
FLUSH PRIVILEGES;
/* 选中vlog数据库 */
USE rust_vlog; 
/* 导入初始化vlog数据库(请依据实际路径) */
SOURCE scripts/example-vlog.sql;

***** * 默认用户/名称: admin / qwe123

设置nginx代理(非必需)

设置并生成Nginx配置文件

cp nginx.conf.default nginx.conf #复制nginx配置文件
cat "/nginx.conf" >> .git/info/exclude #忽略nginx配置文件
vim nginx.conf #修改相应的域名、目录、代理地址、端口

运行程序

cargo run #生产模式: cargo run --release

捐助支持

欢迎各位朋友互相交流, 共同推进rust在**的发展, 感谢支持:

avatar avatar

rust-admin's People

Contributors

bigfish3000 avatar kent58909 avatar

Watchers

 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.