awesome-privacy/api
2024-03-08 18:09:16 +00:00
..
public Update Hono API 2024-03-08 17:48:13 +00:00
src Updates API landing for Hono on CF workers for Swagger 2024-03-08 18:09:16 +00:00
.gitignore Writes API using Hono via Bun TS for Awesome Privacy 2024-03-08 17:38:26 +00:00
open-api-spec.yml Writes API using Hono via Bun TS for Awesome Privacy 2024-03-08 17:38:26 +00:00
package.json Writes API using Hono via Bun TS for Awesome Privacy 2024-03-08 17:38:26 +00:00
README.md Writes API using Hono via Bun TS for Awesome Privacy 2024-03-08 17:38:26 +00:00
tsconfig.json Writes API using Hono via Bun TS for Awesome Privacy 2024-03-08 17:38:26 +00:00
wrangler.toml Updates API landing for Hono on CF workers for Swagger 2024-03-08 18:09:16 +00:00
yarn.lock Writes API using Hono via Bun TS for Awesome Privacy 2024-03-08 17:38:26 +00:00

Cloudflare Workers OpenAPI 3.1

This is a Cloudflare Worker with OpenAPI 3.1 using itty-router-openapi.

Getting Started

  1. You'll need Git and Node.js installed.
  2. Then install wrangler
  3. Clone this project, cd into it and install dependencies with yarn install
  4. Run yarn start to start a local instance of the API.

Development

  1. Run yarn dev to start a local instance of the API.
  2. Open http://localhost:9000/ in your browser to see the Swagger interface where you can try the endpoints.
  3. Changes made in the src/ folder will automatically trigger the server to reload, you only need to refresh the Swagger interface.

Deployment

  1. Sign up for Cloudflare Workers. The free tier is more than enough for most use cases.
  2. Clone this project, cd into api and install dependencies with yarn install
  3. Run wrangler login to login to your Cloudflare account in wrangler
  4. Run wrangler deploy to publish the API to Cloudflare Workers