Skip to content

Commit 94bb1a0

Browse files
authored
Cleanup of TOML file (#2)
* Cleanup * more cleanup * Adding observability * readme
1 parent 6642985 commit 94bb1a0

File tree

4 files changed

+30
-26
lines changed

4 files changed

+30
-26
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Ticket Dynamic OG image generator for JSConf Chile 2024.
2+
3+
### Deploy
4+
5+
#### PROD
6+
7+
```BASH
8+
npx wrangler publish --env=production
9+
```
10+
11+
URL: `tickets-images-worker.jsconf.cl`
12+
13+
#### STAGING
14+
15+
```BASH
16+
npx wrangler publish --env=staging
17+
```
18+
19+
URL: `tickets-images-worker.jsconf.dev`

package-lock.json

Lines changed: 2 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
"@cloudflare/vitest-pool-workers": "^0.5.2",
1414
"@cloudflare/workers-types": "^4.20240925.0",
1515
"@types/react": "^18.2.47",
16-
"react": "^18.2.0",
1716
"typescript": "^5.5.2",
1817
"vitest": "2.0.5",
1918
"wrangler": "^3.60.3"
2019
},
2120
"dependencies": {
21+
"react": "^18.2.0",
2222
"workers-og": "^0.0.25"
2323
}
2424
}

wrangler.toml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@
22
name = "tickets-images-worker"
33
main = "src/index.ts"
44
compatibility_date = "2024-09-25"
5+
observability = { enabled = true }
56
compatibility_flags = ["nodejs_compat"]
6-
7-
name = "tickets-images-worker"
8-
main = "src/index.tsx"
9-
compatibility_date = "2022-12-01"
10-
node_compat = true
117
kv_namespaces = [
128
{ binding = "TICKETS_QR_IMAGES", id = "aa45c255f6f441dda71e45b0c11f132a", preview_id = "b297786957b249dca99978fad2cf95cb" }
139
]
@@ -17,35 +13,27 @@ API_URL = "http://localhost:50123/graphql"
1713
APP_ENV = "localhost"
1814
TTL_EN_SEGUNDOS = 60
1915

20-
[env.localhost]
21-
name = "tickets-images-worker-localhost"
22-
kv_namespaces = [
23-
{ binding = "TICKETS_QR_IMAGES", id = "aa45c255f6f441dda71e45b0c11f132a", preview_id = "b297786957b249dca99978fad2cf95cb" }
24-
]
25-
26-
[env.localhost.vars]
27-
API_URL = "https://api.jsconf.dev/graphql"
28-
APP_ENV = "dev"
29-
TTL_EN_SEGUNDOS = 60
3016

31-
[env.dev]
32-
name = "tickets-images-worker-dev"
17+
[env.staging]
18+
name = "tickets-images-worker-staging"
19+
observability = { enabled = true }
3320
kv_namespaces = [
3421
{ binding = "TICKETS_QR_IMAGES", id = "aa45c255f6f441dda71e45b0c11f132a", preview_id = "b297786957b249dca99978fad2cf95cb" }
3522
]
3623

37-
[env.dev.vars]
24+
[env.staging.vars]
3825
API_URL = "https://api.jsconf.dev/graphql"
39-
APP_ENV = "dev"
26+
APP_ENV = "staging"
4027
TTL_EN_SEGUNDOS = 60
4128

4229
[env.production]
4330
name = "tickets-images-worker-production"
31+
observability = { enabled = true }
4432
kv_namespaces = [
4533
{ binding = "TICKETS_QR_IMAGES", id = "47adcdcd224842dca5b5c91bd51e3f90", preview_id = "47b219e92f9a4f68980f5f5c84cc7218" }
4634
]
4735

4836
[env.production.vars]
4937
API_URL = "https://api.communityos.io/graphql"
5038
APP_ENV = "production"
51-
TTL_EN_SEGUNDOS = 600
39+
TTL_EN_SEGUNDOS = 600

0 commit comments

Comments
 (0)