An open API service indexing awesome lists of open source software.

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

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