feat: implement database view search, add turbine layer config, and refactor turbine geometry calculations and server configuration.
Deploy Bürgerwind / deploy (push) Successful in 19s Details

This commit is contained in:
Johannes Baumeister 2026-05-20 08:00:30 +02:00
parent 2bff715669
commit be2831fcbd
6 changed files with 1523 additions and 455 deletions

915
app.js

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,24 @@
require('dotenv').config({ path: require('node:path').join(__dirname, '../.env') });
const { Client } = require('pg'); const { Client } = require('pg');
async function check() { async function check() {
const host = process.env.DB_HOST;
const port = Number(process.env.DB_PORT || 5432);
const user = process.env.DB_USER;
const password = process.env.DB_PASSWORD;
const database = process.env.DB_NAME;
if (!host || !password) {
console.error("Missing database environment configuration (DB_HOST, DB_PASSWORD). Please check your .env file.");
return;
}
const client = new Client({ const client = new Client({
host: '87.106.21.21', host,
port: 5432, port,
user: 'enwelo_admin', user,
password: 'WX1t1cgP1qK09', password,
database: 'enwelo' database
}); });
try { try {

View File

@ -1,10 +1,10 @@
window.LAYER_CONFIG = [ globalThis.LAYER_CONFIG = [
{ {
"name": "Eigentümer", "name": "Eigentümer",
"file": "Eigentümer", "file": "Eigentümer",
"color": "#000000", "color": "#000000",
"fillColor": "transparent", "fillColor": "transparent",
"weight": 2.0, "weight": 2,
"fillOpacity": 0 "fillOpacity": 0
}, },
{ {
@ -25,7 +25,7 @@ window.LAYER_CONFIG = [
"name": "Freileitungen", "name": "Freileitungen",
"file": "Freileitungen", "file": "Freileitungen",
"color": "#ccaa00", "color": "#ccaa00",
"weight": 3.0, "weight": 3,
"fillOpacity": 0 "fillOpacity": 0
}, },
/* { /* {

1016
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +1,18 @@
require('dotenv').config(); require('dotenv').config({ override: true });
const express = require('express'); const express = require('express');
const { Pool } = require('pg'); const { Pool } = require('pg');
const bodyParser = require('body-parser'); const bodyParser = require('body-parser');
const cors = require('cors'); const cors = require('cors');
const path = require('path'); const path = require('node:path');
const app = express(); const app = express();
app.disable('x-powered-by');
const port = process.env.PORT || 3000; const port = process.env.PORT || 3000;
app.use(cors()); app.use(cors({
origin: ['http://localhost:3000', 'http://localhost:5173', 'http://127.0.0.1:3000', 'http://127.0.0.1:5173'],
credentials: true
}));
app.use(bodyParser.json()); app.use(bodyParser.json());
// Serve static files from the root directory // Serve static files from the root directory
@ -133,7 +137,7 @@ async function resolveProjectId(client, input) {
// API zur Flächensicherung von Eigentümern // API zur Flächensicherung von Eigentümern
app.post('/api/sicherung', async (req, res) => { app.post('/api/sicherung', async (req, res) => {
const { nachname, vorname, projekt_id, status, notiz } = req.body; const { nachname, vorname, status, notiz } = req.body;
const targetStatus = status || 'Gesichert'; const targetStatus = status || 'Gesichert';
const schema = process.env.DB_SCHEMA || 'geodaten'; const schema = process.env.DB_SCHEMA || 'geodaten';

View File

@ -298,10 +298,7 @@ body {
opacity: 0.8; opacity: 0.8;
} }
.legend-item { #floatingLegend .legend-item {
display: flex;
align-items: center;
gap: 10px;
font-size: 0.8rem; font-size: 0.8rem;
margin-bottom: 6px; margin-bottom: 6px;
color: rgba(255, 255, 255, 0.9); color: rgba(255, 255, 255, 0.9);
@ -704,7 +701,7 @@ body {
.status-select { .status-select {
padding: 5px 8px; padding: 5px 8px;
border-radius: 6px; border-radius: 6px;
background: rgba(255, 255, 255, 0.05); background: #0a2d2d;
border: 1px solid var(--border-color); border: 1px solid var(--border-color);
color: white; color: white;
font-size: 0.8rem; font-size: 0.8rem;