feat: add docs (#122)

This commit is contained in:
Dream Hunter
2024-04-14 15:15:09 +08:00
committed by GitHub
parent fb74504282
commit 209693673d
43 changed files with 3073 additions and 16 deletions
+12 -5
View File
@@ -25,12 +25,19 @@ This is a temporary email service that uses Cloudflare Workers to create a tempo
- [x] use rust wasm to parse email
- [x] support send email
![demo](readme_assets/demo.png)
![demo](vitepress-docs/docs/public/readme_assets/demo.png)
## Deploy
[Install/Update Wrangler](https://developers.cloudflare.com/workers/wrangler/install-and-update/)
```bash
npm install wrangler -g
git clone https://github.com/dreamhunter2333/cloudflare_temp_email.git
# Switch to the latest tag or the branch you want to deploy. You can also use the main branch directly.
# git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
```
## DB - Cloudflare D1
```bash
@@ -42,7 +49,7 @@ wrangler d1 execute dev --file=db/schema.sql
# wrangler d1 execute dev --file=db/2024-04-03-patch.sql
```
![d1](readme_assets/d1.png)
![d1](vitepress-docs/docs/public/readme_assets/d1.png)
### Backend - Cloudflare workers
@@ -68,7 +75,7 @@ pnpm run deploy
you can find and test the worker's url in the workers dashboard
![worker](readme_assets/worker.png)
![worker](vitepress-docs/docs/public/readme_assets/worker.png)
## Cloudflare Email Routing
@@ -76,7 +83,7 @@ Before you can bind an email address to your Worker, you need to enable Email Ro
enable email route and config email forward catch-all to the worker
![email](readme_assets/email.png)
![email](vitepress-docs/docs/public/readme_assets/email.png)
### Frontend - Cloudflare pages
@@ -92,7 +99,7 @@ pnpm build --emptyOutDir
pnpm run deploy
```
![pages](readme_assets/pages.png)
![pages](vitepress-docs/docs/public/readme_assets/pages.png)
## Configure sending emails