Skip to content

Latest commit

 

History

History

edge

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CDN edge endpoint

CDN edge endpoint powered by Cloudflare Workers that serves the front-end app.

Directory Structure

├──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)

Getting Started

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).

Scripts

  • build — Build the app for production
  • test — Run unit tests
  • coverage — Run unit tests with enabled coverage report
  • deploy [--env #0] — Deploy the app to Cloudflare (CDN)
  • wrangler [--env #0] — Wrangler CLI (wrapper)

References