wlnxing / cf-worker-speedtest

test cloudflare's speed by workers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Template: worker-speedtest

Deploy to Cloudflare Workers

Worker for measuring download / upload connection speed from the client side, using the Performance Timing API.

index.js is the content of the Workers script.

Note: when running this as your own worker, your latency measurements may differ a small amount from the official version. This is due to the fact that we rely on an internal mechanism to determine the amount of server processing time, which is then subtracted from the measurement.

Setup

To create a my-project directory using this template, run:

$ npx wrangler generate my-project worker-speedtest
# or
$ yarn wrangler generate my-project worker-speedtest
# or
$ pnpm wrangler generate my-project worker-speedtest

Before publishing your code you need to edit wrangler.toml file and add your Cloudflare account_id - more information about publishing your code can be found in the documentation.

Once you are ready, you can publish your code by running the following command:

$ npm run deploy
# or
$ yarn run deploy
# or
$ pnpm run deploy

About

test cloudflare's speed by workers

License:MIT License


Languages

Language:TypeScript 100.0%