refactor: simplify to use SQLite for all environments
Some checks failed
Deploy to Vercel / deploy (push) Has been cancelled
Deploy to Railway / deploy (push) Has been cancelled

- Change all environments (local and NAS) to use SQLite database
- Remove MariaDB dependency and complexity
- Make database initialization optional in deployment script
- Simplify deployment by using single database type across all environments

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-08-25 13:54:59 +09:00
parent ed5fa15814
commit 80f147731e
2 changed files with 14 additions and 35 deletions

View File

@@ -6,21 +6,9 @@ const fs = require('fs');
const bcrypt = require('bcrypt');
const session = require('express-session');
const { v4: uuidv4 } = require('uuid');
// 환경에 따른 데이터베이스 헬퍼 선택
const isNAS = process.env.NODE_ENV === 'production' || process.env.DEPLOY_ENV === 'nas';
const isWindows = process.platform === 'win32' && !isNAS;
let DatabaseHelper;
if (isNAS) {
DatabaseHelper = require('./database/mariadb-helper');
console.log('🗄️ NAS 환경: MariaDB 사용');
} else if (isWindows) {
DatabaseHelper = require('./database/db-helper');
console.log('🗄️ 로컬 Windows 환경: SQLite 사용');
} else {
DatabaseHelper = require('./database/mariadb-helper');
console.log('🗄️ Linux 환경: MariaDB 사용');
}
// 모든 환경에서 SQLite 사용
const DatabaseHelper = require('./database/db-helper');
console.log('🗄️ SQLite 데이터베이스 사용');
const app = express();
const PORT = process.env.PORT || 3005;