Update Setup Guide

This commit is contained in:
codetorso 2024-06-16 00:59:56 -06:00
parent 4daee14a82
commit e0b83adafc

View file

@ -13,8 +13,8 @@
3. Create a `.dev.vars` file in `apps/web` with the following content:
```bash
GOOGLE_CLIENT_ID="-"
GOOGLE_CLIENT_SECRET="-"
GOOGLE_CLIENT_ID="-" // required, visit https://developers.google.com/identity/protocols/oauth2
GOOGLE_CLIENT_SECRET="-" // required
NEXTAUTH_SECRET='nextauthsecret'
DATABASE_URL='database.sqlite'
NEXTAUTH_URL='http://localhost:3000'
@ -28,10 +28,10 @@ First, edit the `wrangler.toml` file in `apps/web` to point the d1 database to y
You can create a d1 database by running this command
```
wrangler d1 create DATABASE_NAME
bunx wrangler d1 create <YOUR_DATABASE_NAME>
```
And then replace these values
And then replace database_name and database_id with the values
```
[[d1_databases]]
@ -43,10 +43,12 @@ database_id = "YOUR_DB_ID"
Simply run this command in `apps/web`
```
wrangler d1 execute dev-d1-anycontext --local --file=db/prepare.sql
bunx wrangler d1 migrations apply <YOUR_DATABASE_NAME>
```
If it runs, you can set up the cloud database as well by removing the `--local` flag.
If it runs, you can set up the cloud database as well by removing the `--local` flag,
if you just want to contribute to frontend then just run `bun run dev` in the root of the project and done! (you won't be able to try ai stuff), otherwise continue...
5. You need to host your own worker for the `apps/cf-ai-backend` module.