Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
# yaml template to refer to https://docs.coderabbit.ai/reference/yaml-template#enterprise
language: "en-US"
tone_instructions: "You are a principal engineer with natural teaching abilities. You detect issues and clearly explain why."
reviews:
collapse_walkthrough: false
profile: "chill"
Expand All @@ -14,6 +15,7 @@ reviews:
auto_review:
enabled: true
drafts: false
base_branches: [".*"]
finishing_touches:
docstrings:
enabled: false
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/lychee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
--cache
--cache-exclude-status 429,500,502,503,504
--max-cache-age 5m
--verbose
--no-progress
--accept 200,201,204,304,403,429
--timeout 20
Expand All @@ -50,7 +49,6 @@ jobs:
args: >
--cache
--max-cache-age 5m
--verbose
--no-progress
--accept 200,201,204,304,403,429
--cache-exclude-status 429,500,502,503,504
Expand Down Expand Up @@ -79,8 +77,8 @@ jobs:
fi

if [ -n "$REPORT_FILE" ]; then
# Read the original output
ORIGINAL=$(cat "$REPORT_FILE")
# Read the original output and remove everything after 'Redirects per input'
ORIGINAL=$(cat "$REPORT_FILE" | sed '/^##* Redirects per input/,$d')

# Create formatted output
cat > lychee/formatted.md << EOF
Expand All @@ -92,7 +90,7 @@ jobs:

EOF

# Append the original content with title replacement
# Append the cleaned content with title replacement
echo "$ORIGINAL" | sed 's/^# Summary$//' | sed 's/^## Summary$//' >> lychee/formatted.md
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,35 @@ For improved compatibility with ECMAScript modules (ESM) and to ensure consisten

:::

## Loading environment variables

To load environment variables in your Prisma application, you can use the `prisma.config.ts` file along with the `env` helper from `prisma/config`. This approach provides better type safety and configuration management.

1. First, install the required dependency:

```bash
npm install dotenv --save-dev
```

2. Create a `.env` file in your project root (if it doesn't exist) and add your database connection string:

```env
DATABASE_URL="your_database_connection_string_here"
```

3. Update your `prisma.config.ts` file in your project root:

```ts
import "dotenv/config";
import { defineConfig, env } from "prisma/config";

export default defineConfig({
datasource: {
url: env("DATABASE_URL"),
},
});
```

## The `@prisma/client` npm package

The `@prisma/client` npm package consists of two key parts:
Expand Down
31 changes: 30 additions & 1 deletion content/200-orm/500-reference/325-prisma-config-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -597,4 +597,33 @@ You can specify a custom location for your config file when running Prisma CLI c

```terminal
prisma validate --config ./path/to/myconfig.ts
```
```

## Loading environment variables

To load environment variables in your Prisma application, you can use the `prisma.config.ts` file along with the `env` helper from `prisma/config`. This approach provides better type safety and configuration management.

1. First, install the required dependency:

```bash
npm install dotenv --save-dev
```

2. Create a `.env` file in your project root (if it doesn't exist) and add your database connection string:

```env
DATABASE_URL="your_database_connection_string_here"
```

3. Update your `prisma.config.ts` file in your project root:

```ts
import "dotenv/config";
import { defineConfig, env } from "prisma/config";

export default defineConfig({
datasource: {
url: env("DATABASE_URL"),
},
});
```
Loading