Skip to content

Commit 03c1103

Browse files
committed
Changing Supabase to Run from local CLI
1 parent ed710e7 commit 03c1103

File tree

7 files changed

+9952
-629
lines changed

7 files changed

+9952
-629
lines changed

examples/nextjs-blog-cms/.env

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
2+
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
3+
INNGEST_EVENT_KEY=<https://www.inngest.com/docs/events/creating-an-event-key>
4+
INNGEST_SIGNING_KEY=<https://www.inngest.com/docs/platform/signing-keys>
5+
OPENAI_API_KEY=
6+
OPENAI_MODEL=gpt-3.5-turbo

examples/nextjs-blog-cms/.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
NEXT_PUBLIC_SUPABASE_URL=<SUBSTITUTE_SUPABASE_URL>
2-
NEXT_PUBLIC_SUPABASE_ANON_KEY=<SUBSTITUTE_SUPABASE_ANON_KEY>
1+
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
2+
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
33
INNGEST_EVENT_KEY=<https://www.inngest.com/docs/events/creating-an-event-key>
44
INNGEST_SIGNING_KEY=<https://www.inngest.com/docs/platform/signing-keys>
55
OPENAI_API_KEY=

examples/nextjs-blog-cms/README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,23 @@ pnpm --ignore-workspace i
6464

6565
### 2. Database setup
6666

67-
This project needs a database to store the blog posts and workflows.
67+
This project needs a database to store the blog posts and workflows using Supabase.
6868

6969
Follow the below steps to get a database up and running with Supabase:
7070

71-
1. Go to [your Supabase Dashboard](https://supabase.com/dashboard/projects) and create a new project
72-
1. While your database is being created, update your `.env.local` and fill the `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_ANON_KEY`
73-
1. Open the SQL Editor from the left side navigation, and copy the content of the `examples/nextjs-blog-cms/supabase/schema.sql` file
74-
1. Still in the SQL Editor, create a new snippet and do the same with the `examples/nextjs-blog-cms/supabase/seed.sql` file
75-
1. Navigate to the Table Editor, you should see two tables: `blog_posts` and `workflows`
71+
1. Install Supabase CLI
7672

77-
You are all set, your database is ready to be used!
73+
```
74+
npm install -g supabase
75+
```
76+
77+
2. Create a new project
78+
79+
```
80+
supabase start
81+
```
82+
83+
3. Copy the `.env.example` file to `.env` and fill the `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_ANON_KEY` with the values given by Supabase.
7884

7985
### 3. Starting the application
8086

0 commit comments

Comments
 (0)