Welcome to the Stupid Cloud Tricks project! This project showcases interesting and fun experiments with cloud technologies, specifically using Cloudflare Workers and Svelte.
-
Who Am I?: A real-time demonstration of Cloudflare's edge network in action. It retrieves your location (latitude and longitude) from the Cloudflare request object and identifies the Cloudflare data center (colo) handling your request. The app calculates the distance between you and the worker, displaying detailed information about both endpoints.
-
Colo Mapping: The mapping of colos to locations is sourced from this repo.
Check out the live demo at tricks.dev.pr.
The source code for this project is available on GitHub.
To start developing locally, clone the repository and install dependencies:
git clone https://github.com/adamb/tricks.git
cd tricks
npm installStart the development server:
npm run devTo create a production build of the app:
npm run buildYou can preview the production build with:
npm run previewTo deploy the app, ensure you have the necessary Cloudflare Workers setup and configurations.
Note: You may need to install an adapter for your target environment.