mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-09-07 00:17:12 +08:00
feat: update readme
This commit is contained in:
@@ -1,9 +1,20 @@
|
|||||||
# cloudflare_temp_email
|
# cloudflare temp email
|
||||||
|
|
||||||
|
利用 Cloudflare Workers 创建临时邮箱
|
||||||
|
|
||||||
|
- 使用 Cloudflare Pages 部署前端
|
||||||
|
- 使用 Cloudflare Workers 部署后端
|
||||||
|
- email 转发使用 Cloudflare Email Route
|
||||||
|
- Cloudflare D1 作为数据库。
|
||||||
|
|
||||||
|
[在线演示](https://temp-email.dreamhunter2333.xyz/)
|
||||||
|
|
||||||
This is a temporary email service that uses Cloudflare Workers to create a temporary email address and view the received email in web browser.
|
This is a temporary email service that uses Cloudflare Workers to create a temporary email address and view the received email in web browser.
|
||||||
|
|
||||||
[Live Demo](https://temp-email.dreamhunter2333.xyz/)
|
[Live Demo](https://temp-email.dreamhunter2333.xyz/)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Deploy
|
## Deploy
|
||||||
|
|
||||||
[Install/Update Wrangler](https://developers.cloudflare.com/workers/wrangler/install-and-update/)
|
[Install/Update Wrangler](https://developers.cloudflare.com/workers/wrangler/install-and-update/)
|
||||||
@@ -23,17 +34,22 @@ wrangler d1 execute dev --file=db/schema.sql
|
|||||||
```bash
|
```bash
|
||||||
cd worker
|
cd worker
|
||||||
npm install
|
npm install
|
||||||
# copy wrangler.toml.template to wrangler.toml and modify it
|
# copy wrangler.toml.template to wrangler.toml
|
||||||
|
# and add your d1 config and these config
|
||||||
|
# PREFIX = "tmp" - the email create will be like tmp<xxxxx>@DOMAIN
|
||||||
|
# DOMAIN = "xxx.xxx" - you domain name
|
||||||
|
# JWT_SECRET = "xxx"
|
||||||
|
# BLACK_LIST = ""
|
||||||
cp wrangler.toml.template wrangler.toml
|
cp wrangler.toml.template wrangler.toml
|
||||||
# deploy
|
# deploy
|
||||||
wrangler deploy
|
wrangler deploy
|
||||||
```
|
```
|
||||||
|
|
||||||
you can find and test the api url in the workers dashboard
|
you can find and test the worker's url in the workers dashboard
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
config email forward
|
enable email route and config email forward catch-all to the worker
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -42,7 +58,7 @@ config email forward
|
|||||||
```bash
|
```bash
|
||||||
cd frontend
|
cd frontend
|
||||||
pnpm install
|
pnpm install
|
||||||
# add .env.local and modify VITE_API_BASE to your api url
|
# add .env.local and modify VITE_API_BASE to your worker's url
|
||||||
cp .env.example .env.local
|
cp .env.example .env.local
|
||||||
pnpm build --emptyOutDir
|
pnpm build --emptyOutDir
|
||||||
cd ..
|
cd ..
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 185 KiB |
@@ -7,6 +7,7 @@ node_compat = true
|
|||||||
PREFIX = "tmp"
|
PREFIX = "tmp"
|
||||||
DOMAIN = "xxx.xxx"
|
DOMAIN = "xxx.xxx"
|
||||||
JWT_SECRET = "xxx"
|
JWT_SECRET = "xxx"
|
||||||
|
BLACK_LIST = ""
|
||||||
|
|
||||||
[[d1_databases]]
|
[[d1_databases]]
|
||||||
binding = "DB"
|
binding = "DB"
|
||||||
|
|||||||
Reference in New Issue
Block a user