No description
Find a file
2023-08-16 22:28:30 -06:00
.editorconfig Initial commit 2023-08-16 17:08:17 -06:00
.gitignore Initial commit 2023-08-16 17:08:17 -06:00
.prettierrc Initial commit 2023-08-16 17:08:17 -06:00
index.js Update homepage 2023-08-16 22:28:30 -06:00
package.json Initial commit 2023-08-16 17:08:17 -06:00
README.md Initial commit 2023-08-16 17:08:17 -06:00
wrangler.toml Initial commit 2023-08-16 17:08:17 -06:00

Template: worker-router

Deploy to Cloudflare Workers

This template demonstrates using the itty-router package to add routing to your Cloudflare Workers.

index.js is the content of the Workers script.

Setup

To create a my-project directory using this template, run:

$ npx wrangler generate my-project worker
# or
$ yarn wrangler generate my-project worker
# or
$ pnpm wrangler generate my-project worker

Before publishing your code you need to edit wrangler.toml file and add your Cloudflare account_id - more information about configuring and publishing your code can be found in the documentation.

Once you are ready, you can publish your code by running the following command:

$ npm run deploy
# or
$ yarn run deploy
# or
$ pnpm run deploy