1
0
mirror of https://github.com/tormachris/cf-workers-status-page.git synced 2025-07-17 04:15:15 +02:00

Add more data centre locations

The full list of locations was generated from the [Cloudflare Status Page](https://www.cloudflarestatus.com/):

```bash
{
  echo 'export const locations = {';
  curl -ks https://www.cloudflarestatus.com/ | grep -- '- (' | while read line; do
    code=$(awk -F '[()]' '{print $2}' <<< "$line");
    city=$(awk -F '[,-]' '{print $1}' <<< "$line");
    echo "  $code: '${city//\'/’}',";
  done | sort;
  echo '}';
} > src/functions/locations.js
```
This commit is contained in:
Chris Buckley
2021-10-05 23:53:06 +01:00
committed by Adam Janiš
parent a8cfe25c9a
commit f0b27a8446
4 changed files with 228 additions and 9 deletions

View File

@ -3,13 +3,6 @@ import { useEffect, useState } from 'react'
const kvDataKey = 'monitors_data_v1_1'
export const locations = {
WAW: 'Warsaw',
SCL: 'Santiago de Chile',
MEL: 'Melbourne',
SIN: 'Singapore',
}
export async function getKVMonitors() {
// trying both to see performance difference
return KV_STATUS_PAGE.get(kvDataKey, 'json')