-
Notifications
You must be signed in to change notification settings - Fork 0
Update README for Supabase #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,7 +59,7 @@ You can use these accounts to explore the platform: | |
|
|
||
| ### Prerequisites | ||
| - Node.js (v16 or higher) | ||
| - MongoDB (local or remote) | ||
| - Supabase project with PostgreSQL database | ||
|
|
||
| ### Installation | ||
|
|
||
|
|
@@ -77,7 +77,10 @@ You can use these accounts to explore the platform: | |
| 3. Create a `.env` file in the root directory with the following variables: | ||
| ``` | ||
| PORT=3000 | ||
| MONGODB_URI=mongodb://localhost:27017/wirebase | ||
| SUPABASE_URL=your-supabase-url | ||
| SUPABASE_KEY=your-anon-key | ||
| SUPABASE_SERVICE_KEY=your-service-role-key | ||
| SUPABASE_DB_PASSWORD=your-database-password | ||
| SESSION_SECRET=your-session-secret | ||
| NODE_ENV=development | ||
| ``` | ||
|
|
@@ -118,9 +121,12 @@ You can use these accounts to explore the platform: | |
| - `NODE_ENV`: `production` | ||
| - `SESSION_SECRET`: (generate a random string) | ||
| - `PORT`: `10000` (or use Render assigned port) | ||
| - `MONGODB_URI`: (your MongoDB connection string) | ||
| - `SUPABASE_URL`: your Supabase project URL | ||
| - `SUPABASE_KEY`: your anon key | ||
| - `SUPABASE_SERVICE_KEY`: your service role key | ||
| - `SUPABASE_DB_PASSWORD`: your database password | ||
|
Comment on lines
+124
to
+127
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's good to see As with the local setup, it's crucial that the deployed application's Knex configuration in A quick observation regarding |
||
|
|
||
| 3. Create a MongoDB database and connect it to your service | ||
| 3. Create a Supabase project and connect it to your service using the variables above | ||
|
|
||
| ## Customization | ||
|
|
||
|
|
@@ -151,6 +157,7 @@ Users can create their profiles with raw HTML/CSS, either through: | |
| SUPABASE_URL=your-supabase-url | ||
| SUPABASE_KEY=your-anon-key | ||
| SUPABASE_SERVICE_KEY=your-service-role-key | ||
| SUPABASE_DB_PASSWORD=your-database-password | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding This reinforces the need to ensure that the application's database connection logic (in |
||
| SESSION_SECRET=your-secret | ||
| PORT=3000 | ||
| NODE_ENV=development | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding
SUPABASE_DB_PASSWORDto the example environment variables. This aligns with the standard practice for providing the Supabase project's database password.However, this raises an important question regarding the application's current database configuration:
Could you clarify if the Knex configuration in
server.js(specifically around line 43,password: process.env.SUPABASE_SERVICE_KEY.split('.')[0]) has been or will be updated to useprocess.env.SUPABASE_DB_PASSWORD?The current method of deriving the password from
SUPABASE_SERVICE_KEYis non-standard and unlikely to yield the correct database password, which is a separate credential obtained from your Supabase project settings (typically under Database > Connection Info).Ensuring
server.jsuses the actualSUPABASE_DB_PASSWORDis critical for successful database connections. The test failures mentioned in the PR description (npm test (fails: Missing required Supabase environment variables)) might be related if the application or tests now expectSUPABASE_DB_PASSWORDto be correctly set and utilized.