# api-tpl-rs **Repository Path**: thinkinpg/api-tpl-rs ## Basic Information - **Project Name**: api-tpl-rs - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2024-07-22 - **Last Updated**: 2024-07-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # api-tpl-rs Rust API 快速开发脚手架 - 路由使用 [axum](https://github.com/tokio-rs/axum) - ORM使用 [sea-orm](https://github.com/SeaQL/sea-orm) - Redis使用 [redis-rs](https://github.com/redis-rs/redis-rs) - 日志使用 [tracing](https://github.com/tokio-rs/tracing) - 配置使用 [config-rs](https://github.com/mehcode/config-rs) - 命令行使用 [clap](https://github.com/clap-rs/clap) - 异步运行时使用 [tokio](https://github.com/tokio-rs/tokio) - 参数验证器使用 [validator](https://github.com/Keats/validator) - 包含基础的登录授权功能 - 包含 认证、请求日志、跨域 中间价 - 包含基于 Redis 的简单分布式锁 - 包含 AES、Hash、时间格式化 等实用的工具方法 - 简单好用的 API Result 统一输出方式 #### 1. 模块说明 - `api` => 处理API服务 - `cmd` => 定义命令行 - `ent` => 定义数据库实体 - `pkg` => 放置公共库 #### 2. 本地运行 ```sh # 数据库 demo_rs.sql # 配置文件 mv config.toml.example config.toml # 启动服务 cargo run -- serve ```