chart-based route finding

This commit is contained in:
Tim
2024-02-27 22:20:23 -04:00
parent fc126955b6
commit 9a5d7a1ce5
12 changed files with 126 additions and 46 deletions

View File

@@ -1,5 +1,17 @@
const versionPromise = fetch('/version.json').then(async (response)=>await response.json())
const metadataPromise = fetch('/metadata.json').then(async (response)=>await response.json())
function _json(name) {
return async function(response) {
try {
return await response.json()
}
catch (e) {
console.error(`could not read ${name}`)
return null
}
}
}
const versionPromise = fetch('/version.json').then(_json('version.json'))
const metadataPromise = fetch('/metadata.json').then(_json('metadata.json'))
export const version = await versionPromise
console.log('version', version)