Logo
Explore Help
Sign In
wangdl/api-server
2
0
Fork 0
You've already forked api-server
Code Issues 45 Pull Requests Actions Packages Projects Releases Wiki Activity
api-server/src/config/storage.config.ts

12 lines
352 B
TypeScript
Raw Normal View History

feat: 重构 api-server 为模块化单体架构,接入 MySQL + Redis - 按 BACKEND-PLAN.md 将项目重构为 4 层架构: config/ -> common/ -> infrastructure/ -> modules/ - 15 个业务模块,遵循 Controller → Service → Repository 分层 - infrastructure: PrismaService / RedisService / QueueService / AiService / StorageService - common: guards / interceptors / filters / pipes / decorators / dto / types / utils - Prisma schema 含 27 张表,MySQL 8.0 服务器 db push 成功 - Redis 7 接入: 限流/任务状态/分布式锁/队列预留 - ai-analysis 模块: 每日 50 次限流 + 重复提交锁 + 异步任务状态追踪 - document-import 模块: 异步导入流程 + 进度追踪 - notifications 模块: BullMQ notification 队列预留 - /health 端点实时返回 database + redis 连接状态 - Swagger 注册 15 个 tag,67 个路由全部映射
2026-05-09 18:25:04 +08:00
import { registerAs } from '@nestjs/config';
export default registerAs('storage', () => ({
driver: process.env.STORAGE_DRIVER || 'local',
localPath: process.env.STORAGE_LOCAL_PATH || './uploads',
s3: {
bucket: process.env.STORAGE_S3_BUCKET,
region: process.env.STORAGE_S3_REGION,
endpoint: process.env.STORAGE_S3_ENDPOINT,
},
}));
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 31ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API