Commit e1cdcb9518
Unsigned
Layout: unified · split
api/README.md deleted −20
| @@ -1,20 +0,0 @@ | |||
| 1 | # Cloudflare Workers OpenAPI 3.1 | ||
| 2 | |||
| 3 | This is a Cloudflare Worker with OpenAPI 3.1 using [itty-router-openapi](https://github.com/cloudflare/itty-router-openapi). | ||
| 4 | |||
| 5 | ## Getting Started | ||
| 6 | 1. You'll need Git and Node.js installed. | ||
| 7 | 2. Then install [wrangler](https://developers.cloudflare.com/workers/cli-wrangler/install-update) | ||
| 8 | 3. Clone this project, cd into it and install dependencies with `yarn install` | ||
| 9 | 4. Run `yarn start` to start a local instance of the API. | ||
| 10 | |||
| 11 | ## Development | ||
| 12 | 1. Run `yarn dev` to start a local instance of the API. | ||
| 13 | 2. Open `http://localhost:9000/` in your browser to see the Swagger interface where you can try the endpoints. | ||
| 14 | 3. Changes made in the `src/` folder will automatically trigger the server to reload, you only need to refresh the Swagger interface. | ||
| 15 | |||
| 16 | ## Deployment | ||
| 17 | 1. Sign up for [Cloudflare Workers](https://workers.dev). The free tier is more than enough for most use cases. | ||
| 18 | 2. Clone this project, cd into api and install dependencies with `yarn install` | ||
| 19 | 3. Run `wrangler login` to login to your Cloudflare account in wrangler | ||
| 20 | 4. Run `wrangler deploy` to publish the API to Cloudflare Workers | ||
api/README.txt added +52
| @@ -0,0 +1,52 @@ | |||
| 1 | |||
| 2 | AWESOME PRIVACY API SOURCE | ||
| 3 | ============================================================================ | ||
| 4 | |||
| 5 | ABOUT | ||
| 6 | ----- | ||
| 7 | This directory contains the source for the Awesome Privacy API. | ||
| 8 | You can use the API to interact with our data programmatically. | ||
| 9 | The API is build using Hono, and intended for Cloudflare Workers. | ||
| 10 | |||
| 11 | ============================================================================ | ||
| 12 | |||
| 13 | PUBLIC INSTANCE | ||
| 14 | --------------- | ||
| 15 | We have a free, no-auth, CORS-enabled instance which you can use. | ||
| 16 | Get started with the Swagger docs at https://api.awesomeprivacy.com | ||
| 17 | |||
| 18 | ============================================================================ | ||
| 19 | |||
| 20 | GETTING STARTED | ||
| 21 | --------------- | ||
| 22 | 1. You'll first need Git and Node.js installed on your system | ||
| 23 | 2. Then install wrangler, `npm install wrangler --save-dev` | ||
| 24 | 3. Download `git clone git@github.com:Lissy93/awesome-privacy.git` | ||
| 25 | 4. And navigate int the api dir, with `cd awesome-privacy/api` | ||
| 26 | 5. Install all required dependencies, by running `npm install` | ||
| 27 | 4. Then run `yarn start` to start a local instance of the API | ||
| 28 | |||
| 29 | ============================================================================ | ||
| 30 | |||
| 31 | DEVELOPMENT | ||
| 32 | ----------- | ||
| 33 | 1. Run `yarn dev` to start a local instance of the API + Swagger interface | ||
| 34 | 2. Open `http://localhost:9000` in your browser or with a HTTP client | ||
| 35 | 3. Make any desired changes in `src/` - the server will automatically reload | ||
| 36 | |||
| 37 | ============================================================================ | ||
| 38 | |||
| 39 | DEPLOYMENT | ||
| 40 | ---------- | ||
| 41 | 1. Sign up for Cloudflare Workers (https://workers.dev) - free tier is fine | ||
| 42 | 2. Follow the steps in "Getting Started" to setup the project locally | ||
| 43 | 3. Run `wrangler login` to login to your Cloudflare account in wrangler | ||
| 44 | 4. Run `wrangler deploy` to publish the API to Cloudflare Workers | ||
| 45 | |||
| 46 | ============================================================================ | ||
| 47 | |||
| 48 | LICENSE | ||
| 49 | ------- | ||
| 50 | This project is licensed under MIT, (C) Alicia Sykes <aliciasykes.com> 2024 | ||
| 51 | See the GitHub repo for more info https://github.com/Lissy93/awesome-privacy | ||
| 52 | |||