From 4ac3cfe3086914d8db9d18ab0711770dff5ba240 Mon Sep 17 00:00:00 2001 From: BackRunner Date: Mon, 26 Aug 2024 01:38:36 +0800 Subject: [PATCH] chore: update readme --- README.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index f6de34d..39eff81 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,9 @@ AlphaPush is a general-purpose push notification service with a PWA client, base npm install ``` -3. Create a `.env` file in the root directory with the following variables: +3. Create an OAuth application in your GitHub account and get the client ID and client secret. + +4. Create a `.env` file in the root directory with the following variables: ``` GITHUB_CLIENT_ID=your_github_client_id @@ -65,28 +67,30 @@ AlphaPush uses Cloudflare D1 for its database. Follow these steps to set it up: wrangler d1 create alphapush-prod ``` -3. Note the database ID from the output and add it to your `.env` file: +3. Apply migrations to your production database: ``` - DB_ID=your_database_id + npm run db:migrate:prod ``` -4. Generate the database schema: +4. Create a KV namespace: ``` - npm run db:generate + wrangler kv:namespace create alphapush ``` -5. Apply migrations to your local development database: +5. Setup the environment variables: ``` - npm run db:migrate:local + DB_ID=your_database_id ``` -6. Apply migrations to your production database: +6. Setup `wrangler.toml` with the following content: - ``` - npm run db:migrate:prod + ```toml + kv_namespaces = [ + { binding = "KV", id = "your_kv_namespace_id" } + ] ``` ### Development