mirror of
https://github.com/ceratic/project_vollidioten_website.git
synced 2026-05-14 00:16:47 +02:00
feat: add world map functionality and admin map management
- 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
This commit is contained in:
55
test-database-connection.js
Normal file
55
test-database-connection.js
Normal file
@@ -0,0 +1,55 @@
|
||||
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();
|
||||
Reference in New Issue
Block a user