import type { IncomingMessage, ServerResponse } from "node:http"; type Photo = { id: string; name: string; latitude: number | null; longitude: number | null; capturedAt: string | null; thumbUrl: string; fullUrl: string; source: "demo" | "nextcloud"; }; type ShareListingEntry = { href: string; name: string; lastModified: string | null; contentType: string; isCollection: boolean; }; const demoPhotos: Photo[] = [ { id: "demo-1", name: "berlin-brandenburg-gate.jpg", latitude: 52.516275, longitude: 13.377704, capturedAt: "2026-06-07T08:20:00.000Z", thumbUrl: "https://images.unsplash.com/photo-1467269204594-9661b134dd2b?auto=format&fit=crop&w=240&q=60", fullUrl: "https://images.unsplash.com/photo-1467269204594-9661b134dd2b?auto=format&fit=crop&w=1600&q=80", source: "demo" }, { id: "demo-2", name: "museum-island.jpg", latitude: 52.5169, longitude: 13.4015, capturedAt: "2026-06-07T08:42:00.000Z", thumbUrl: "https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?auto=format&fit=crop&w=240&q=60", fullUrl: "https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?auto=format&fit=crop&w=1600&q=80", source: "demo" }, { id: "demo-3", name: "alexanderplatz.jpg", latitude: 52.521918, longitude: 13.413215, capturedAt: "2026-06-07T09:05:00.000Z", thumbUrl: "https://images.unsplash.com/photo-1494526585095-c41746248156?auto=format&fit=crop&w=240&q=60", fullUrl: "https://images.unsplash.com/photo-1494526585095-c41746248156?auto=format&fit=crop&w=1600&q=80", source: "demo" } ]; function htmlPage(): string { return ` mapy-mg

mapy-mg

Fotos laden, EXIF lokal im Browser auslesen und auf OpenStreetMap anzeigen.

Client-only Import · kein Bildspeicher auf dem Server
Hover: Thumbnail · Klick: Vollbild · Route: zeitlich sortiert
`; } export function createRequestHandler() { return async function handleRequest(req: IncomingMessage, res: ServerResponse) { const url = new URL(req.url ?? "/", "http://localhost"); if (url.pathname === "/health") { res.statusCode = 200; res.setHeader("content-type", "application/json; charset=utf-8"); res.end(JSON.stringify({ status: "ok" })); return; } res.statusCode = 200; res.setHeader("content-type", "text/html; charset=utf-8"); res.end(htmlPage()); }; }