From eac8b85d35395c2afed868b24c8cbf53a1570b76 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Sun, 18 Feb 2024 16:06:16 +0100 Subject: [PATCH] Add summary prefix --- scripts/osm2pgsql/tilecountServer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/osm2pgsql/tilecountServer.ts b/scripts/osm2pgsql/tilecountServer.ts index 385fbc825..698dcc0d4 100644 --- a/scripts/osm2pgsql/tilecountServer.ts +++ b/scripts/osm2pgsql/tilecountServer.ts @@ -201,7 +201,7 @@ const connectionString = "postgresql://user:password@localhost:5444/osm-poi" const tcs = new OsmPoiDatabase(connectionString) const server = new Server(2345, [ { - mustMatch: "status.json", + mustMatch: "summary/status.json", mimetype: "application/json", handle: async (path: string) => { const layers = await tcs.getLayers() @@ -210,7 +210,7 @@ const server = new Server(2345, [ }, }, { - mustMatch: /[a-zA-Z0-9+]+\/[0-9]+\/[0-9]+\/[0-9]+\.json/, + mustMatch: /summary\/[a-zA-Z0-9+]+\/[0-9]+\/[0-9]+\/[0-9]+\.json/, mimetype: "application/json", // "application/vnd.geo+json", async handle(path) { console.log("Path is:", path, path.split(".")[0])