Files
writer-work-flow/apps/web/lib/api/config.ts
Yaojia Wang d3dc620a71 feat: Phase 0 — monorepo 骨架 + 全表迁移 + FastAPI/Next 骨架 + CI
- uv(workspace) + pnpm monorepo;docker-compose(pg+api+web)
- SQLAlchemy 16 MVP 表 + Alembic 初版迁移(无漂移,users stub)
- FastAPI 骨架:统一错误信封(带 request_id) + structlog + /jobs/:id + OpenAPI
- Next.js 骨架:纸感主题 token + OpenAPI→TS 客户端代码生成(gen:api)
- CI(ruff/mypy/pytest + pg service + alembic 漂移校验)
- 四份设计规格(PRODUCT/UX/ARCHITECTURE/DEV_PLAN) + CLAUDE.md
2026-06-18 11:38:28 +02:00

9 lines
369 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 后端基址:服务端组件用 INTERNAL容器内 service 名),客户端用 PUBLIC浏览器可达
// 两者皆可缺省回退到本地开发地址。
export const API_BASE_PUBLIC =
process.env.NEXT_PUBLIC_API_BASE ?? "http://localhost:8000";
export function serverApiBase(): string {
return process.env.API_BASE_INTERNAL ?? API_BASE_PUBLIC;
}