https://github.com/capturecontext/spi-proxy-worker
A Cloudlfare Worker to proxy request for https://swiftpackageindex.com. Used for SPI extension in Raycast https://www.raycast.com/maximkrouk/swift-package-index
https://github.com/capturecontext/spi-proxy-worker
Last synced: about 2 months ago
JSON representation
A Cloudlfare Worker to proxy request for https://swiftpackageindex.com. Used for SPI extension in Raycast https://www.raycast.com/maximkrouk/swift-package-index
- Host: GitHub
- URL: https://github.com/capturecontext/spi-proxy-worker
- Owner: CaptureContext
- Created: 2024-03-22T19:36:36.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-28T18:53:32.000Z (almost 2 years ago)
- Last Synced: 2025-03-10T07:52:46.689Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# spi-proxy-worker
A Cloudlfalre worker to proxy request to https://swiftpackageindex.com. To learn more about workers read [this](https://developers.cloudflare.com/workers/)
> [!WARNING]
> Currently deployed at https://spi-proxy-worker.dev-capturecontext-8f5.workers.dev
## Local Development
You need a `node.js` and `npm`. I recommend installing [nvm](https://github.com/nvm-sh/nvm) to manage `js` related stuff and don’t mess with a system.
To run localy:
```shell
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=`. To learn more read https://developers.cloudflare.com/workers/configuration/secrets/
## Deployment
To deploy a project to Cloudflare run:
```shell
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