mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-05-11 18:10:01 +08:00
feat: add readme
This commit is contained in:
14
README.md
14
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
|
||||
```
|
||||
|
||||

|
||||
|
||||
### 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
|
||||
|
||||

|
||||
|
||||
### 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
|
||||
```
|
||||
|
||||

|
||||
|
||||
BIN
readme_assets/d1.png
Normal file
BIN
readme_assets/d1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 162 KiB |
BIN
readme_assets/pages.png
Normal file
BIN
readme_assets/pages.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
BIN
readme_assets/worker.png
Normal file
BIN
readme_assets/worker.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 137 KiB |
Reference in New Issue
Block a user