Start from scratch
To start from scratch to create a Workers Site, follow these steps:
In your terminal run
wrangler generate --site <project-name>, replacing
<project-name>with the name of your project. For example, I’ll create a project called my-site by running this command:
$ wrangler generate --site my-site
This command creates the following:
public: The static assets for your project. By default it contains an
wrangler.toml: Your configuration file. You’ll configure your account and project information here.
wrangler.toml. You can find your
account_idon the right sidebar of the Workers or Overview Dashboard. Note: You may need to scroll down! For more details on finding your
You can preview your site by running:
$ wrangler preview --watch
Then, update your
Personal Domain: Add your
zone_id = "42ef.."route = "example.com/*"
workers_devto true. This is the default.
$ wrangler publish