This is an official toucan-js
starter that uses wrangler to manage workflows, webpack to bundle code, and @sentry/webpack-plugin to upload sourcemaps to Sentry.
- yarn installed globally.
- Run
yarn
to install all packages in this project.
- Run
- Cloudflare account.
- Run
yarn wrangler login
to associatewrangler
with your Cloudflare account.
- Run
- Sentry account.
- Create a new Sentry project. Choose
javascript
as the platform.
- Create a new Sentry project. Choose
You will need to obtain Sentry DSN for your Sentry project. Once you have it, update SENTRY_DSN
variable in wrangler.toml
with your value.
[vars]
SENTRY_DSN = "https://123:456@testorg.ingest.sentry.io/123"
If you want to upload sourcemaps, you need to obtain 3 values and set them as environment variables.
// This is your organization slug, you can find it in Settings in Sentry dashboard
export SENTRY_ORG="..."
// Your project name
export SENTRY_PROJECT="..."
// Auth tokens can be obtained from https://sentry.io/settings/account/api/auth-tokens/ and need `project:releases` and `org:read` scopes
export SENTRY_AUTH_TOKEN="..."
yarn deploy
yarn start
Runs the worker locally.