cdnjs / api-server

📡 API server for api.cdnjs.com - The #1 free and open source CDN built to make life easier for developers.
https://api.cdnjs.com
MIT License
89 stars 38 forks source link

Migrate to a Cloudflare Worker #75

Closed MattIPv4 closed 2 years ago

MattIPv4 commented 2 years ago

Type of Change

What issue does this relate to?

N/A

What should this PR do?

Replaces the Express server that powers the API with Hono, which will allow the API to be run as a Cloudflare Worker.

Updates all the routes and utilities to run through Hono, and updates the test suite to use Miniflare.

Updates documentation in the repository to reflect that the API is now a Cloudflare Worker, including development + deployment information.

Introduces GitHub Actions workflows for automatic Cloudflare Worker deployments based on staging + production branches.

What are the acceptance criteria?

All tests pass without any material changes to them, API can be run successfully as a Cloudflare Worker.