This is a Cloudflare Worker that fetches data from the Hurricane Electric Points of Presence (POPs) API, converts the data to CSV format, and stores it in a Cloudflare Workers KV namespace.
- Node.js
- npm or yarn
- A Cloudflare account with Workers and Workers KV enabled
-
Clone this repository:
git clone https://github.com/yourusername/he-pops-worker.git cd he-pops-worker -
Install the dependencies:
npm install
-
Copy the
wrangler.toml.examplefile towrangler.tomland update theaccount_idandkv_namespacesvalues with your actual Cloudflare account ID and KV namespace ID:cp wrangler.toml.example wrangler.toml nano wrangler.toml
-
Build the worker:
npm run build
-
Publish the worker:
wrangler publish
Once the worker is published, it will automatically fetch the data from the HE POPs API, convert it to CSV, and store it in the KV namespace every time it receives a request. You can trigger this process by sending a request to the worker's URL.
This project is licensed under the MIT License. See the LICENSE file for details.