diff --git a/README.md b/README.md index 31563dfa..19ef94ae 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,18 @@ This is a temporary email service that uses Cloudflare Workers to create a tempo ## Deploy +[Install/Update Wrangler](https://developers.cloudflare.com/workers/wrangler/install-and-update/) + ## DB - Cloudflare D1 ```bash -# create a database, and copy the config to wrangler.toml in the next step +# create a database, and copy the output to wrangler.toml in the next step wrangler d1 create dev wrangler d1 execute dev --file=db/schema.sql ``` +![d1](readme_assets/d1.png) + ### Backend - Cloudflare workers ```bash @@ -25,14 +29,20 @@ cp worker/wrangler.toml.template worker/wrangler.toml wrangler deploy ``` +you can find and test the api url in the workers dashboard + +![worker](readme_assets/worker.png) + ### Frontend - Cloudflare pages ```bash cd frontend pnpm install -# add .env.local and modify it +# add .env.local and modify VITE_API_BASE to your api url cp .env.example .env.local pnpm build --emptyOutDir cd .. wrangler pages deploy dist --branch production ``` + +![pages](readme_assets/pages.png) diff --git a/image.png b/image.png new file mode 100644 index 00000000..3921ec53 Binary files /dev/null and b/image.png differ diff --git a/readme_assets/d1.png b/readme_assets/d1.png new file mode 100644 index 00000000..0ef331d1 Binary files /dev/null and b/readme_assets/d1.png differ diff --git a/readme_assets/pages.png b/readme_assets/pages.png new file mode 100644 index 00000000..710fd4be Binary files /dev/null and b/readme_assets/pages.png differ diff --git a/readme_assets/worker.png b/readme_assets/worker.png new file mode 100644 index 00000000..53ec3b5f Binary files /dev/null and b/readme_assets/worker.png differ