mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-09-09 01:17:02 +08:00
feat: add readme
This commit is contained in:
@@ -6,14 +6,18 @@ This is a temporary email service that uses Cloudflare Workers to create a tempo
|
|||||||
|
|
||||||
## Deploy
|
## Deploy
|
||||||
|
|
||||||
|
[Install/Update Wrangler](https://developers.cloudflare.com/workers/wrangler/install-and-update/)
|
||||||
|
|
||||||
## DB - Cloudflare D1
|
## DB - Cloudflare D1
|
||||||
|
|
||||||
```bash
|
```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 create dev
|
||||||
wrangler d1 execute dev --file=db/schema.sql
|
wrangler d1 execute dev --file=db/schema.sql
|
||||||
```
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### Backend - Cloudflare workers
|
### Backend - Cloudflare workers
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -25,14 +29,20 @@ cp worker/wrangler.toml.template worker/wrangler.toml
|
|||||||
wrangler deploy
|
wrangler deploy
|
||||||
```
|
```
|
||||||
|
|
||||||
|
you can find and test the api url in the workers dashboard
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### Frontend - Cloudflare pages
|
### Frontend - Cloudflare pages
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd frontend
|
cd frontend
|
||||||
pnpm install
|
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
|
cp .env.example .env.local
|
||||||
pnpm build --emptyOutDir
|
pnpm build --emptyOutDir
|
||||||
cd ..
|
cd ..
|
||||||
wrangler pages deploy dist --branch production
|
wrangler pages deploy dist --branch production
|
||||||
```
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 162 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 137 KiB |
Reference in New Issue
Block a user