Commit 865bdd43 authored by Matthew Gall's avatar Matthew Gall

Added base files for automatic deployment

parent d49ff2b1
NAME := worker-mirrors
.PHONY: deploy
curl -X PUT "${CLOUDFLARE_ORG_ID}/workers/scripts/${NAME}" -H "X-Auth-Email:${CLOUDFLARE_EMAIL}" -H "X-Auth-Key:${CLOUDFLARE_KEY}" -F '[email protected];type=application/javascript' -F 'metadata={"body_part": "script", "bindings": [{"name": "mirrors", "type": "kv_namespace", "namespace_id": "${CLOUDFLARE_KV_NAMESPACEID}"}]};type=application/json'
.PHONY: deploy-mirrors
curl "${CLOUDFLARE_ORG_ID}/storage/kv/namespaces/${CLOUDFLARE_KV_NAMESPACEID}/values/mirrors" -X PUT -H "X-Auth-Email:${CLOUDFLARE_EMAIL}" -H "X-Auth-Key:${CLOUDFLARE_KEY}" --data @mirrors.json
\ No newline at end of file
"piwheels": {
"endpoint": "",
"user-agent": " (piwheels)"
\ No newline at end of file
addEventListener('fetch', event => {
function isInArray(value, array) {
return array.indexOf(value) > -1;
* Fetch and log a request
* @param {Request} request
async function handleRequest(request) {
path = new URL(request.url).pathname;
return new Response('Welcome to', {
headers: {
'Content-Type': 'text/plain'
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment