mirror of
https://github.com/Lissy93/awesome-privacy.git
synced 2026-03-11 08:55:33 +00:00
| .. | ||
| public | ||
| src | ||
| .gitignore | ||
| open-api-spec.yml | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| wrangler.toml | ||
| yarn.lock | ||
Cloudflare Workers OpenAPI 3.1
This is a Cloudflare Worker with OpenAPI 3.1 using itty-router-openapi.
Getting Started
- You'll need Git and Node.js installed.
- Then install wrangler
- Clone this project, cd into it and install dependencies with
yarn install - Run
yarn startto start a local instance of the API.
Development
- Run
yarn devto start a local instance of the API. - Open
http://localhost:9000/in your browser to see the Swagger interface where you can try the endpoints. - Changes made in the
src/folder will automatically trigger the server to reload, you only need to refresh the Swagger interface.
Deployment
- Sign up for Cloudflare Workers. The free tier is more than enough for most use cases.
- Clone this project, cd into api and install dependencies with
yarn install - Run
wrangler loginto login to your Cloudflare account in wrangler - Run
wrangler deployto publish the API to Cloudflare Workers