kriasoft / graphql-starter-kit

💥 Monorepo template (seed project) pre-configured with GraphQL API, PostgreSQL, React, and Joy UI.
https://graphqlstart.com
MIT License
3.88k stars 553 forks source link

refactor: Upgrade Wrangler CLI from v1 to v2 #346

Closed koistya closed 2 years ago

koistya commented 2 years ago

Pro Tip: Use yarn web:cf to access Wrangler CLI, injecting the wrangler.toml file with the correct values for the target environment. For example:

# Update `SOME_API_KEY` secret in the `test` (default) and `prod` CF Workers environments. See /env/*.env
$ yarn web:cf secret put SOME_API_KEY --env=test
$ yarn web:cf secret put SOME_API_KEY --env=prod

# Access the streaming logs, connecting to the target CF Worker script
$ yarn web:cf tail --env=test

# Deploy web front-end to a CF Worker script named `proxy` (https://example.com)
$ yarn web:cf publish --env=prod

# Deploy web front-end to a CF Worker script named `proxy-test` (https://test.example.com)
$ yarn web:cf publish --env=test

# Deploy web front-end to a CF Worker script named `proxy-test-23` (https://23-test.example.com)
$ yarn web:cf publish --env=test --version=23

# See the full list of CF Workers CLI options
$ yarn web:cf --help

https://developers.cloudflare.com/workers/wrangler/get-started/