2 Star 7 Fork 4

tanghc / admin-rs

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

admin-rs

一个后台管理系统,使用Rust编写,采用分层架构(model, dao, service, controller),实现了基本的CURD

项目采用前后端分离的方式,后端Rust写接口,返回json数据,前端使用ajax请求接口。

后端技术选型

前端技术选型

vue + elementUI

工程介绍

  • front:前端vue工程
  • server:后端Rust工程

准备工作

开发环境:rust nightly, MySQL5.6+, NodeJS

因为Rocket框架需要Rust nightly版本,首先要切换Rust版本为nightly,具体方法见:Installing Rust

  • 安装mysqlclient
  • 导入SQL脚本(mysql.sql)
  • 打开server/src/application.yml,修改datasource.url
  • 运行server
  • 运行front,见front readme

如果不想启动前端可以导入postman文件直接请求后端

打包发布

cd server,命令行跳转到server目录

部署在macOS

假设部署在macOS上,则打包命令:cargo build --release --target=x86_64-apple-darwin

打包结果生成在:server/target/x86_64-apple-darwin/release,整个release文件夹就是打包后的程序

application.yml文件复制到release下,修改相关配置,然后cd到release,执行./server即可启动服务

部署在Linux

假设开发环境是macOS,程序部署在Linux环境,参考:Rust交叉编译Mac编译Linux平台

预览图

预览

MIT License Copyright (c) 2021 tanghc 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.

简介

一个后台管理系统,使用Rust编写,采用分层架构(model, dao, service, controller),实现了基本的CURD 展开 收起
Rust
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Rust
1
https://gitee.com/durcframework/admin-rs.git
git@gitee.com:durcframework/admin-rs.git
durcframework
admin-rs
admin-rs
master

搜索帮助