fixed missing endpoint GET /routes/:id/pois/:id and added json style fileupload

This commit is contained in:
Florian Zumpe
2026-06-17 01:39:50 +02:00
parent 5c85a0194b
commit 09ce7c0605
10 changed files with 380 additions and 50 deletions
+3 -1
View File
@@ -4,6 +4,7 @@ import { fileURLToPath } from 'node:url';
const projectRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
const resolveFromRoot = (value, fallback) => path.resolve(projectRoot, value || fallback);
const maxUploadBytes = Number.parseInt(process.env.MAX_UPLOAD_MB || '50', 10) * 1024 * 1024;
export const config = Object.freeze({
projectRoot,
@@ -11,7 +12,8 @@ export const config = Object.freeze({
port: Number.parseInt(process.env.PORT || '47145', 10),
dataDir: resolveFromRoot(process.env.DATA_DIR, 'data'),
storageDir: resolveFromRoot(process.env.STORAGE_DIR, 'storage'),
maxUploadBytes: Number.parseInt(process.env.MAX_UPLOAD_MB || '50', 10) * 1024 * 1024,
maxUploadBytes,
maxJsonBodyBytes: Math.ceil(maxUploadBytes * 4 / 3) + 1024 * 1024,
defaultRouteRadiusKm: Number.parseFloat(process.env.DEFAULT_ROUTE_RADIUS_KM || '25'),
defaultPoiTriggerMeters: Number.parseFloat(process.env.DEFAULT_POI_TRIGGER_METERS || '80')
});