Fix API configuration and test production build

- Updated .env file with correct VITE_API_BASE_URL for local development
- Fixed API endpoint routing from localhost:5173 to localhost:3001
- Tested npm run build successfully with no errors
- Updated database and server configurations
This commit is contained in:
patdelphi
2025-08-19 18:47:26 +08:00
parent 9472fa8af7
commit 858a0961b5
6 changed files with 41 additions and 4 deletions

View File

@@ -15,6 +15,12 @@ class DatabaseManager {
// 初始化数据库连接
init() {
try {
// 确保数据库目录存在
const dbDir = path.dirname(this.dbPath);
if (!fs.existsSync(dbDir)) {
fs.mkdirSync(dbDir, { recursive: true });
}
// 创建或连接到SQLite数据库
this.db = new Database(this.dbPath);