Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ When using Cloudflare's built-in CI/CD pipeline (**Workers & Pages → Create
|---|---|
| Project name | `minimalblock` |
| Build command | `nx build:worker api` |
| Deploy command | `npx wrangler deploy` |
| Non-production branch deploy command | `npx wrangler versions upload` |
| Deploy command | `npx wrangler deploy --config apps/api/wrangler.toml` |
| Non-production branch deploy command | `npx wrangler versions upload --config apps/api/wrangler.toml` |
| Root directory | `/` |

Add all secrets from the table above as **Environment Variables** in the Cloudflare dashboard before the first deploy.
Expand Down
11 changes: 4 additions & 7 deletions apps/api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,29 +73,26 @@
"dependsOn": ["build:worker"],
"executor": "nx:run-commands",
"options": {
"cwd": "apps/api",
"command": "npx wrangler deploy"
"command": "npx wrangler deploy --config apps/api/wrangler.toml"
},
"configurations": {
"preview": {
"command": "npx wrangler versions upload"
"command": "npx wrangler versions upload --config apps/api/wrangler.toml"
}
}
},
"deploy:preview": {
"dependsOn": ["build:worker"],
"executor": "nx:run-commands",
"options": {
"cwd": "apps/api",
"command": "npx wrangler versions upload"
"command": "npx wrangler versions upload --config apps/api/wrangler.toml"
}
},
"cf:dev": {
"continuous": true,
"executor": "nx:run-commands",
"options": {
"cwd": "apps/api",
"command": "npx wrangler dev ../../dist/apps/api/worker.js --port 8787"
"command": "npx wrangler dev dist/apps/api/worker.js --config apps/api/wrangler.toml --port 8787"
}
},
"prune-lockfile": {
Expand Down
2 changes: 1 addition & 1 deletion apps/api/wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "minimalblock"
main = "../../dist/apps/api/worker.js"
main = "dist/apps/api/worker.js"
compatibility_date = "2024-09-23"
compatibility_flags = ["nodejs_compat"]

Expand Down
Loading