2020-11-10 11:46:02 +00:00
|
|
|
# wrangler
|
|
|
|
|
2021-05-20 21:13:41 +01:00
|
|
|
> Cloudflare Workers command-line tool.
|
2020-11-10 11:46:02 +00:00
|
|
|
> More information: <https://developers.cloudflare.com/workers/>.
|
|
|
|
|
|
|
|
- Initialize a project with a skeleton configuration:
|
|
|
|
|
|
|
|
`wrangler init {{project_name}}`
|
|
|
|
|
|
|
|
- Authenticate with Cloudflare:
|
|
|
|
|
|
|
|
`wrangler login`
|
|
|
|
|
|
|
|
- Start a local development server:
|
|
|
|
|
|
|
|
`wrangler dev --host {{hostname}}`
|
|
|
|
|
|
|
|
- Publish the worker script:
|
|
|
|
|
|
|
|
`wrangler publish`
|
|
|
|
|
|
|
|
- Aggregate logs from the production worker:
|
|
|
|
|
|
|
|
`wrangler tail`
|