Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
backrunner committed Aug 25, 2024
1 parent e54dacb commit 4ac3cfe
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 4ac3cfe

Please sign in to comment.