Update README.md
This commit is contained in:
parent
031c1af449
commit
04ab0f02d3
26
README.md
26
README.md
@ -48,14 +48,28 @@ npm run dev
|
|||||||
|
|
||||||
### Cloudflare Workers (Database, Storage, AI)
|
### Cloudflare Workers (Database, Storage, AI)
|
||||||
|
|
||||||
|
Directories:
|
||||||
|
|
||||||
|
- `/backend/database`: D1 database
|
||||||
|
- `/backend/storage`: R2 storage
|
||||||
|
- `/backend/ai`: Workers AI
|
||||||
|
|
||||||
Install dependencies
|
Install dependencies
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd backend/<database | storage | ai> # do these individually
|
cd backend/database
|
||||||
|
npm install
|
||||||
|
|
||||||
|
cd ../storage
|
||||||
|
npm install
|
||||||
|
|
||||||
|
cd ../ai
|
||||||
npm install
|
npm install
|
||||||
```
|
```
|
||||||
|
|
||||||
For each, add the required environment variables in `wrangler.toml` (example file provided in `wrangler.example.toml`). For the AI worker, you can define any value you want for the `CF_AI_KEY` -- set this in other `.env` files to authorize access.
|
Read the [documentation](https://developers.cloudflare.com/workers/) to learn more about workers.
|
||||||
|
|
||||||
|
For each directory, add the required environment variables in `wrangler.toml` (example file provided in `wrangler.example.toml`). For the AI worker, you can define any value you want for the `CF_AI_KEY` -- set this in other `.env` files to authorize access.
|
||||||
|
|
||||||
Run in development mode
|
Run in development mode
|
||||||
|
|
||||||
@ -63,12 +77,14 @@ Run in development mode
|
|||||||
npm run dev
|
npm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
Deploy to Cloudflare with wrangler
|
Deploy to Cloudflare with [Wrangler](https://developers.cloudflare.com/workers/wrangler/install-and-update/)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx wrangler deploy
|
npx wrangler deploy
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Thanks for your interest in contributing! Review this section before submitting your first pull request. If you need any help, feel free to reach out to [@ishaandey\_](https://x.com/ishaandey_).
|
Thanks for your interest in contributing! Review this section before submitting your first pull request. If you need any help, feel free to reach out to [@ishaandey\_](https://x.com/ishaandey_).
|
||||||
@ -94,7 +110,7 @@ backend/
|
|||||||
|
|
||||||
| Path | Description |
|
| Path | Description |
|
||||||
| ------------------ | -------------------------------------------------------------------------- |
|
| ------------------ | -------------------------------------------------------------------------- |
|
||||||
| `frontend/www/app` | The Next.js application for the frontend. |
|
| `frontend` | The Next.js application for the frontend. |
|
||||||
| `backend/server` | The Express websocket server. |
|
| `backend/server` | The Express websocket server. |
|
||||||
| `backend/database` | API for interfacing with the D1 database (SQLite). |
|
| `backend/database` | API for interfacing with the D1 database (SQLite). |
|
||||||
| `backend/storage` | API for interfacing with R2 storage. Service-bound to `/backend/database`. |
|
| `backend/storage` | API for interfacing with R2 storage. Service-bound to `/backend/database`. |
|
||||||
@ -137,6 +153,8 @@ It should be in the form `category(scope or module): message` in your commit mes
|
|||||||
|
|
||||||
e.g. `feat(editor): improve tab switching speed`
|
e.g. `feat(editor): improve tab switching speed`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Tech stack
|
## Tech stack
|
||||||
|
|
||||||
### Frontend
|
### Frontend
|
||||||
|
Loading…
x
Reference in New Issue
Block a user