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:
63
test-api-connection.js
Normal file
63
test-api-connection.js
Normal file
@@ -0,0 +1,63 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import fetch from 'node-fetch';
|
||||
|
||||
async function testAPIConnection() {
|
||||
console.log('🧪 Testing API Connection...');
|
||||
|
||||
const baseURL = 'https://vollidioten.ceraticsoft.de';
|
||||
|
||||
try {
|
||||
// Test basic API status
|
||||
console.log('📡 Testing API status...');
|
||||
const statusResponse = await fetch(`${baseURL}/api/status`);
|
||||
if (statusResponse.ok) {
|
||||
const statusData = await statusResponse.json();
|
||||
console.log('✅ API Status:', statusData);
|
||||
} else {
|
||||
console.log('❌ API Status failed:', statusResponse.status);
|
||||
}
|
||||
|
||||
// Test map metadata endpoint
|
||||
console.log('🗺️ Testing map metadata endpoint...');
|
||||
const metadataResponse = await fetch(`${baseURL}/api/map/metadata`);
|
||||
if (metadataResponse.ok) {
|
||||
const metadata = await metadataResponse.json();
|
||||
console.log('✅ Map metadata:', metadata);
|
||||
} else {
|
||||
console.log('⚠️ Map metadata not available (this is expected if map not assembled):', metadataResponse.status);
|
||||
}
|
||||
|
||||
// Test layers endpoint
|
||||
console.log('📊 Testing layers endpoint...');
|
||||
const layersResponse = await fetch(`${baseURL}/api/map/layers`);
|
||||
if (layersResponse.ok) {
|
||||
const layers = await layersResponse.json();
|
||||
console.log('✅ Layers:', layers.length, 'layers found');
|
||||
} else {
|
||||
console.log('❌ Layers endpoint failed:', layersResponse.status);
|
||||
}
|
||||
|
||||
// Test markers endpoint
|
||||
console.log('📍 Testing markers endpoint...');
|
||||
const markersResponse = await fetch(`${baseURL}/api/map/markers/public`);
|
||||
if (markersResponse.ok) {
|
||||
const markers = await markersResponse.json();
|
||||
console.log('✅ Markers:', markers.length, 'markers found');
|
||||
} else {
|
||||
console.log('❌ Markers endpoint failed:', markersResponse.status);
|
||||
}
|
||||
|
||||
console.log('\n🎉 API connection test completed!');
|
||||
|
||||
} catch (error) {
|
||||
console.error('❌ API connection test failed:', error.message);
|
||||
console.log('\n💡 Troubleshooting tips:');
|
||||
console.log('1. Check if the backend server is running');
|
||||
console.log('2. Verify the API endpoints are accessible');
|
||||
console.log('3. Check for CORS issues');
|
||||
console.log('4. Ensure the database is connected');
|
||||
}
|
||||
}
|
||||
|
||||
testAPIConnection();
|
||||
Reference in New Issue
Block a user