Skip to content

Commit 119a832

Browse files
committed
migrate to workers
1 parent eef06af commit 119a832

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"scripts": {
66
"dev": "next dev --turbopack",
7-
"build": "next build",
7+
"build": "next build && wrangler pages functions build --outdir=./out/_worker.js/",
88
"start": "next start",
99
"lint": "next lint",
1010
"export": "next build",

wrangler.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
1-
name = "apis-guru-workers"
1+
name = "apis-guru"
22
compatibility_date = "2025-07-01"
33
compatibility_flags = ["nodejs_compat"]
44

5-
# Environment configuration for Pages Functions
6-
pages_build_output_dir = "out"
5+
main = "./out/_worker.js"
6+
7+
[assets]
8+
directory = "./out"
9+
binding = "ASSETS"
710

8-
# D1 Database binding (default, used for local development)
911
[[d1_databases]]
1012
binding = "DB"
1113
database_name = "apis-guru-data-dev"
1214
database_id = "1090248d-84f7-4ffe-ab4f-5fd27c98d3e0"
1315
migrations_dir = "migrations"
1416

15-
# Production D1 Database binding (for direct CLI access)
1617
[[d1_databases]]
1718
binding = "PROD_DB"
1819
database_name = "apis-guru-data"
1920
database_id = "660cdfd3-7c06-44ea-8e6d-f658f4fc39ca"
2021
migrations_dir = "migrations"
2122

22-
23-
# Environment variables (default)
2423
[vars]
2524
SYNC_URL = "https://api.apis.guru/v2/list.json"
2625
BATCH_SIZE = "100"
2726
MAX_PAGE_SIZE = "100"
2827
DEFAULT_PAGE_SIZE = "20"
29-
SENTRY_DSN="https://8296abef723d97e7b8d5a15d1e93be1f@o4509816683823104.ingest.us.sentry.io/4509831375683584"
28+
SENTRY_DSN = "https://8296abef723d97e7b8d5a15d1e93be1f@o4509816683823104.ingest.us.sentry.io/4509831375683584"
3029

31-
# Preview configuration (development/staging)
3230
[env.preview]
31+
3332
[[env.preview.d1_databases]]
3433
binding = "DB"
3534
database_name = "apis-guru-data-dev"
3635
database_id = "1090248d-84f7-4ffe-ab4f-5fd27c98d3e0"
3736
migrations_dir = "migrations"
37+
3838
[env.preview.vars]
3939
SYNC_URL = "https://api.apis.guru/v2/list.json"
4040
BATCH_SIZE = "100"
4141
MAX_PAGE_SIZE = "100"
4242
DEFAULT_PAGE_SIZE = "20"
4343

44-
# Production configuration
4544
[env.production]
45+
4646
[[env.production.d1_databases]]
4747
binding = "DB"
4848
database_name = "apis-guru-data"
4949
database_id = "660cdfd3-7c06-44ea-8e6d-f658f4fc39ca"
5050
migrations_dir = "migrations"
51+
5152
[env.production.vars]
5253
SYNC_URL = "https://api.apis.guru/v2/list.json"
5354
BATCH_SIZE = "100"
5455
MAX_PAGE_SIZE = "100"
5556
DEFAULT_PAGE_SIZE = "20"
56-

0 commit comments

Comments
 (0)