mirror of
https://github.com/ceratic/project_vollidioten_website.git
synced 2026-05-14 00:16:47 +02:00
- Added world map page with interactive marker display - Implemented admin map management for marker CRUD operations - Added map layers and markers seed data to database - Integrated new routes for map functionality - Updated database configuration for production environment - Added documentation page route - Enhanced package.json with required dependencies for map features
56 lines
1.7 KiB
JavaScript
56 lines
1.7 KiB
JavaScript
const { db, init } = require('./backend/database');
|
|
|
|
// Test database connection and map markers
|
|
async function testDatabase() {
|
|
console.log('Testing database connection...');
|
|
|
|
try {
|
|
// Initialize database
|
|
init();
|
|
|
|
// Wait a moment for initialization
|
|
setTimeout(() => {
|
|
console.log('Testing map markers query...');
|
|
|
|
// Test map markers query
|
|
db.all('SELECT * FROM map_markers', [], (err, rows) => {
|
|
if (err) {
|
|
console.error('Error querying map markers:', err);
|
|
return;
|
|
}
|
|
|
|
console.log('Map markers found:', rows.length);
|
|
console.log('Markers:', rows);
|
|
});
|
|
|
|
// Test map layers query
|
|
db.all('SELECT * FROM map_layers', [], (err, rows) => {
|
|
if (err) {
|
|
console.error('Error querying map layers:', err);
|
|
return;
|
|
}
|
|
|
|
console.log('Map layers found:', rows.length);
|
|
console.log('Layers:', rows);
|
|
});
|
|
|
|
// Test map metadata query
|
|
db.all('SELECT * FROM map_metadata', [], (err, rows) => {
|
|
if (err) {
|
|
console.error('Error querying map metadata:', err);
|
|
return;
|
|
}
|
|
|
|
console.log('Map metadata found:', rows.length);
|
|
console.log('Metadata:', rows);
|
|
});
|
|
|
|
}, 3000);
|
|
|
|
} catch (error) {
|
|
console.error('Error initializing database:', error);
|
|
}
|
|
}
|
|
|
|
testDatabase();
|