應用 APP 功能實作

This commit is contained in:
2025-09-09 18:18:02 +08:00
parent 22bbe64349
commit 900e33aefa
22 changed files with 2745 additions and 242 deletions

28
scripts/simple-check.js Normal file
View File

@@ -0,0 +1,28 @@
const mysql = require('mysql2/promise');
async function simpleCheck() {
try {
const connection = await mysql.createConnection({
host: 'localhost',
user: 'root',
password: '123456',
database: 'ai_showcase_platform'
});
console.log('✅ 資料庫連接成功');
// 檢查 user_ratings 表
const [ratings] = await connection.execute('SELECT * FROM user_ratings LIMIT 5');
console.log('📊 user_ratings 數據:', ratings);
// 檢查 apps 表
const [apps] = await connection.execute('SELECT id, name FROM apps LIMIT 3');
console.log('📱 apps 數據:', apps);
await connection.end();
} catch (error) {
console.error('❌ 錯誤:', error.message);
}
}
simpleCheck();