feat: [阶段1] 项目初始化和基础设置

- 创建 Cargo.toml 配置文件,包含所有必要依赖
- 建立完整的项目模块结构(config, models, handlers, routes, services, storage, middleware, utils)
- 实现用户数据模型和内存存储
- 创建基础的 HTTP 处理器和路由配置
- 添加错误处理和 JWT 认证中间件
- 配置环境变量和日志系统
- 创建项目文档和学习指南
- 服务器可以成功编译和启动
This commit is contained in:
2025-08-04 16:49:50 +08:00
commit 28afc7532f
24 changed files with 2170 additions and 0 deletions

9
.env.example Normal file
View File

@@ -0,0 +1,9 @@
# 服务器配置
SERVER_HOST=127.0.0.1
SERVER_PORT=3000
# JWT 密钥
JWT_SECRET=your-secret-key-change-this-in-production
# 数据库配置(可选)
# DATABASE_URL=sqlite://database.db