Skip to content

fix(react-router-example): use process.env for DATABASE_URL fallback - #41

Merged
kattsushi merged 2 commits into
masterfrom
fix/react-router-example-pipeline-process-env
Feb 9, 2026
Merged

kattsushi merged 2 commits into
masterfrom
fix/react-router-example-pipeline-process-env

Conversation

@kattsushi

@kattsushi kattsushi commented Feb 9, 2026 •

Copy link
Copy Markdown
Contributor

This PR replaces env("DATABASE_URL") with process.env.DATABASE_URL in prisma.config.ts.

Reason:
env() from prisma/config throws an error if the environment variable is missing, which causes CI/CD failures during prisma generate when no DB is available.
Using process.env allows the nullish coalescing operator (??) to provide a fallback dummy URL, enabling the generation step to succeed in CI.

Summary by CodeRabbit

  • Chores
    • Updated configuration setup to streamline environment variable handling in the database connection.

@coderabbitai

coderabbitai Bot commented Feb 9, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Removed the env import from "prisma/config" and replaced env("DATABASE_URL") with direct process.env.DATABASE_URL access in the Prisma configuration file's datasource URL default, changing how the environment variable is sourced.

Changes

Cohort / File(s) Summary
Prisma Configuration
apps/react-router-example/prisma.config.ts
Removed env import and replaced env("DATABASE_URL") with process.env.DATABASE_URL for datasource URL default.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

🐰 The env import bids farewell,
As process.env breaks the spell,
Direct and simple, plain to see,
Prisma's config runs so free! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: replacing env() with process.env for the DATABASE_URL fallback in the react-router-example configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/react-router-example-pipeline-process-env

No actionable comments were generated in the recent review. 🎉


Comment @coderabbitai help to get the list of available commands and usage tips.

@kattsushi
kattsushi merged commit c6f61db into master Feb 9, 2026
5 of 6 checks passed
kattsushi added a commit that referenced this pull request Mar 15, 2026
…41)

* fix(react-router-example): use process.env for DATABASE_URL fallback

* refactor: remove unused import from prisma config file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant