feat(api): 初始化笔记应用后端基础架构
- 添加环境配置文件 .env.example 包含数据库、JWT、CORS等配置 - 创建 .gitignore 文件忽略敏感文件和临时文件 - 配置 Apache 重写规则支持路由转发 - 实现 JWT 认证中间件提供用户身份验证功能 - 添加 MySQL 数据库初始化脚本包含分组、图片、笔记表结构
This commit is contained in:
18
biji-php/.env.example
Normal file
18
biji-php/.env.example
Normal file
@@ -0,0 +1,18 @@
|
||||
# 数据库配置
|
||||
DB_HOST=localhost
|
||||
DB_PORT=3306
|
||||
DB_NAME=biji_db
|
||||
DB_USER=root
|
||||
DB_PASS=
|
||||
|
||||
# JWT 配置
|
||||
JWT_SECRET=your-secret-key-change-this
|
||||
JWT_EXPIRE=86400
|
||||
|
||||
# 应用配置
|
||||
APP_ENV=development
|
||||
APP_DEBUG=true
|
||||
UPLOAD_DIR=../uploads
|
||||
|
||||
# CORS 配置
|
||||
CORS_ORIGIN=http://localhost:5173
|
||||
Reference in New Issue
Block a user