Skip to content

fix: load dotenv/config at app entry point#6

Merged
nagauta merged 1 commit into
mainfrom
fix/dotenv-config
Feb 14, 2026
Merged

fix: load dotenv/config at app entry point#6
nagauta merged 1 commit into
mainfrom
fix/dotenv-config

Conversation

@nagauta
Copy link
Copy Markdown
Owner

@nagauta nagauta commented Feb 14, 2026

Summary

  • dotenv/config をエントリポイント (apps/web/src/index.ts) の先頭で import するように修正
  • DATABASE_URL が未設定で Error: DATABASE_URL is not set が発生していた問題を解消

Test plan

  • pnpm dev でサーバー起動後、/api エンドポイントへのアクセスで DB 接続エラーが出ないことを確認
  • pnpm test が通ること

🤖 Generated with Claude Code

DATABASE_URL was not available at runtime because dotenv was never
initialized. Import dotenv/config at the top of the entry file so
environment variables from .env are loaded before any module accesses
process.env.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nagauta nagauta merged commit 40c3391 into main Feb 14, 2026
3 checks passed
@nagauta nagauta deleted the fix/dotenv-config branch February 14, 2026 14:47
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