Zum Inhalt springen

Deploy To Cloudflare Workers

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

  1. Deploy to Cloudflare Workers with the following:

    Terminal window
    npm run cloudflare:deploy

    If you do not have an existing Cloudflare project, this command will help you set up one.

  2. Create a copy of wrangler.toml.example as wrangler.toml via the following command:

    Terminal window
    cp wrangler.toml.example wrangler.toml
  3. Next, set all the environment variables in wrangler.toml file from your local .env file.

  4. Finally, deploy to Cloudflare Workers (again) with the following:

    Terminal window
    npm run cloudflare:deploy
  5. Now that’s set up, you can deploy in future iterations only by executing the command once.