Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 1.05 KB

README.md

File metadata and controls

34 lines (21 loc) · 1.05 KB

spi-proxy-worker

A Cloudlfalre worker to proxy request to https://swiftpackageindex.com. To learn more about workers read this

Local Development

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 run

Warning

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/

Deployment

To deploy a project to Cloudflare run:

make deploy

Warning

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