Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to a Cloudflare Worker #75

Merged
merged 47 commits into from
Jul 23, 2022
Merged

Migrate to a Cloudflare Worker #75

merged 47 commits into from
Jul 23, 2022

Conversation

MattIPv4
Copy link
Member

Type of Change

  • Routes: No routes should have changed.
  • Utilities: Utilities were updated to support new framework (hono).
  • Tests: Tests were refactored to use Miniflare.
  • Something else: Express replaces with Hono (for Cloudflare Workers).

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.

src/utils/fetchJson.js Show resolved Hide resolved
package.json Show resolved Hide resolved
src/utils/queryArray.js Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/routes/libraries.js Outdated Show resolved Hide resolved
src/routes/libraries.js Outdated Show resolved Hide resolved
src/utils/kvMetadata.js Outdated Show resolved Hide resolved
src/utils/kvMetadata.js Outdated Show resolved Hide resolved
src/utils/sriForVersion.js Outdated Show resolved Hide resolved
.github/workflows/production-workflow.yml Outdated Show resolved Hide resolved
.github/workflows/production-workflow.yml Show resolved Hide resolved
src/routes/libraries.spec.js Outdated Show resolved Hide resolved
src/routes/libraries.spec.js Outdated Show resolved Hide resolved
src/utils/spec/request.js Outdated Show resolved Hide resolved
src/utils/algolia.js Show resolved Hide resolved
src/utils/algolia.js Show resolved Hide resolved
.github/workflows/production-workflow.yml Show resolved Hide resolved
@MattIPv4 MattIPv4 marked this pull request as ready for review June 8, 2022 02:12
src/routes/tutorials.js Show resolved Hide resolved
src/routes/tutorials.js Show resolved Hide resolved
.github/workflows/production-workflow.yml Show resolved Hide resolved
src/utils/spec/request.js Outdated Show resolved Hide resolved
.github/workflows/production-workflow.yml Show resolved Hide resolved
src/routes/libraries.js Show resolved Hide resolved
src/routes/libraries.spec.js Show resolved Hide resolved
@MattIPv4 MattIPv4 merged commit a66a3fb into master Jul 23, 2022
@MattIPv4 MattIPv4 deleted the MattIPv4/worker branch July 23, 2022 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants