CDN edge endpoint powered by Cloudflare Workers that serves the front-end app.
├──
core
— Core application modules
├──
routes
— API routes (endpoints)
├──
global.d.ts
— Global TypeScript declarations
├──
index.ts
— Cloudflare Worker entry point
├──
package.json
— The list of dependencies
├──
tsconfig.ts
— TypeScript configuration (docs)
├──
vite.config.ts
— JavaScript bundler configuration (docs)
└──
wrangler.toml
— Wrangler CLI configuration (docs)
Test the app locally using Vitest:
$ yarn workspace edge test
Build and deploy the app by running:
$ yarn workspace app build
$ yarn workspace edge build
$ yarn workspace edge deploy [--env #0]
Start a session to livestream logs from a deployed Worker:
$ yarn workspace edge wrangler tail [--env #0]
Where --env
is one of the supported environments, such as --env=prod
, --env=test
(default).
build
— Build the app for productiontest
— Run unit testscoverage
— Run unit tests with enabled coverage reportdeploy [--env #0]
— Deploy the app to Cloudflare (CDN)wrangler [--env #0]
— Wrangler CLI (wrapper)
- https://hono.dev/ — JavaScript framework for CDN edge endpoints
- https://developers.cloudflare.com/workers/ — Cloudflare Workers docs
- https://www.typescriptlang.org/ — TypeScript reference
- https://vitejs.dev/ — Front-end tooling (bundler)
- https://vitest.dev/ — Unit test framework