Skip to content

Commit

Permalink
🔨 add color for debugging (discerning dashboard and wrangler defined …
Browse files Browse the repository at this point in the history
…vars)
  • Loading branch information
danyx23 committed Aug 12, 2024
1 parent 5f7e06e commit 346c730
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions functions/grapher/thumbnail/[slug].ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface Env {
}
url: URL
ENV: string
COLOR: string
}

const router = Router<IRequestStrict, [URL, Env, ExecutionContext]>()
Expand All @@ -18,6 +19,7 @@ router
const info = {
url: env.url,
env: env.ENV,
color: env.COLOR,
searchParams: Array.from(searchParams.entries()),
}
return new Response(JSON.stringify(info), {
Expand Down
3 changes: 3 additions & 0 deletions wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ pages_build_output_dir = "./localBake"
# Vars that should be available in all envs, including local dev
[vars]
ENV = "development"
COLOR = "green"

# Overrides for CF preview deployments
[env.preview.vars]
MAILGUN_DOMAIN = "mg.ourworldindata.org"
SLACK_ERROR_CHANNEL_ID = "C016H0BNNB1"
ENV = "preview"
COLOR = "yellow"

# Overrides for CF production deployment
[env.production]
Expand All @@ -21,3 +23,4 @@ compatibility_date = "2024-04-29"
ENV = "production"
MAILGUN_DOMAIN = "mg.ourworldindata.org"
SLACK_ERROR_CHANNEL_ID = "C5JJW19PS"
COLOR = "red"

0 comments on commit 346c730

Please sign in to comment.