From 04ab0f02d36f2e34cea3d8de6b2eb49412254c75 Mon Sep 17 00:00:00 2001 From: Ishaan Dey <69771365+ishaan1013@users.noreply.github.com> Date: Thu, 30 May 2024 16:14:43 -0700 Subject: [PATCH] Update README.md --- README.md | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b257eb0..e422fc7 100644 --- a/README.md +++ b/README.md @@ -48,14 +48,28 @@ npm run dev ### Cloudflare Workers (Database, Storage, AI) +Directories: + +- `/backend/database`: D1 database +- `/backend/storage`: R2 storage +- `/backend/ai`: Workers AI + Install dependencies ```bash -cd backend/ # do these individually +cd backend/database +npm install + +cd ../storage +npm install + +cd ../ai 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 @@ -63,12 +77,14 @@ Run in development mode npm run dev ``` -Deploy to Cloudflare with wrangler +Deploy to Cloudflare with [Wrangler](https://developers.cloudflare.com/workers/wrangler/install-and-update/) ```bash npx wrangler deploy ``` +--- + ## 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_). @@ -94,7 +110,7 @@ backend/ | 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/database` | API for interfacing with the D1 database (SQLite). | | `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` +--- + ## Tech stack ### Frontend