mirror of
https://github.com/patdelphi/suanming.git
synced 2026-02-28 05:33:11 +08:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user