docs(readme): Update deployment and database mode documentation
- Clarify database mode details in both README.md and README_EN.md - Highlight default local database mode (IndexedDB) usage - Remove redundant recommendation for local database configuration - Add explanation of Supabase cloud database option - Update notes about Vercel deployment and backend API - Modify vercel.json to set default local database environment variable
This commit is contained in:
parent
67e050f0e0
commit
074ac71b20
|
|
@ -124,9 +124,13 @@ vercel --prod
|
||||||
- ✅ 支持自定义域名
|
- ✅ 支持自定义域名
|
||||||
- ✅ 自动部署(Git 推送后自动更新)
|
- ✅ 自动部署(Git 推送后自动更新)
|
||||||
|
|
||||||
|
**✨ 数据库模式**:
|
||||||
|
- 默认自动使用**本地数据库模式**(IndexedDB),数据存储在浏览器中
|
||||||
|
- 无需配置任何数据库,开箱即用
|
||||||
|
- 如需使用 Supabase 云端数据库,可在环境变量中配置
|
||||||
|
|
||||||
**⚠️ 注意事项**:
|
**⚠️ 注意事项**:
|
||||||
- Vercel 主要用于前端部署,后端 API 需单独部署
|
- Vercel 主要用于前端部署,后端 API 需单独部署
|
||||||
- 推荐使用本地数据库模式(`VITE_USE_LOCAL_DB=true`)
|
|
||||||
- 部署后可在 `/admin` 页面进行运行时配置
|
- 部署后可在 `/admin` 页面进行运行时配置
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -124,9 +124,13 @@ vercel --prod
|
||||||
- ✅ Custom domain support
|
- ✅ Custom domain support
|
||||||
- ✅ Automatic deployment (auto-update on Git push)
|
- ✅ Automatic deployment (auto-update on Git push)
|
||||||
|
|
||||||
|
**✨ Database Mode**:
|
||||||
|
- Automatically uses **local database mode** (IndexedDB) by default, data stored in browser
|
||||||
|
- No database configuration needed, ready to use out of the box
|
||||||
|
- To use Supabase cloud database, configure environment variables
|
||||||
|
|
||||||
**⚠️ Important Notes**:
|
**⚠️ Important Notes**:
|
||||||
- Vercel is primarily for frontend deployment; backend APIs need separate deployment
|
- Vercel is primarily for frontend deployment; backend APIs need separate deployment
|
||||||
- Recommended to use local database mode (`VITE_USE_LOCAL_DB=true`)
|
|
||||||
- After deployment, configure runtime settings at `/admin` page
|
- After deployment, configure runtime settings at `/admin` page
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,11 @@
|
||||||
"buildCommand": "npm run build",
|
"buildCommand": "npm run build",
|
||||||
"outputDirectory": "dist",
|
"outputDirectory": "dist",
|
||||||
"framework": "vite",
|
"framework": "vite",
|
||||||
|
"build": {
|
||||||
|
"env": {
|
||||||
|
"VITE_USE_LOCAL_DB": "true"
|
||||||
|
}
|
||||||
|
},
|
||||||
"rewrites": [
|
"rewrites": [
|
||||||
{
|
{
|
||||||
"source": "/(.*)",
|
"source": "/(.*)",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue