A Cloudlfalre worker to proxy request to https://swiftpackageindex.com. To learn more about workers read this
Warning
Currently deployed at https://spi-proxy-worker.dev-capturecontext-8f5.workers.dev
You need a node.js and npm. I recommend installing nvm to manage js related stuff and don’t mess with a system.
To run localy:
make runWarning
You need to create a .dev.vars file at the root of the project and provide an API_TOKEN variable in following format API_TOKEN=<TOKEN>. To learn more read https://developers.cloudflare.com/workers/configuration/secrets/
To deploy a project to Cloudflare run:
make deployWarning
You need to add an API_TOKEN to a worker after deployment. To do this run npx wrangler secret put API_TOKEN and put a token value when prompted.
Warning
If command fails with Authentication error try running npx wrangler login first