fix(mana-crawler): default DATABASE_URL to mana_platform in dev

The Go binary's config.go hardcoded "postgresql://…/mana" as the
DATABASE_URL fallback, but no database named "mana" exists locally
or in the macmini compose stack — the platform DB is mana_platform.
Anyone running the crawler without an explicit override got a
"database \"mana\" does not exist" crash at startup. The dev:crawler
script in package.json had been papering over this by setting
DATABASE_URL explicitly; drop that override now that the binary
default is correct.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-15 18:18:19 +02:00
parent 0ef650d94a
commit c5a4c5158f
2 changed files with 2 additions and 2 deletions

View file

@ -220,7 +220,7 @@
"cf:projects:list": "npx wrangler pages project list",
"cf:projects:create": "echo 'Creating Cloudflare Pages projects...' && npx wrangler pages project create chat-landing --production-branch=main && npx wrangler pages project create picture-landing --production-branch=main && npx wrangler pages project create mana-landing --production-branch=main && npx wrangler pages project create cards-landing --production-branch=main && npx wrangler pages project create quotes-landing --production-branch=main",
"dev:search": "cd services/mana-search && go run ./cmd/server",
"dev:crawler": "cd services/mana-crawler && DATABASE_URL=postgresql://mana:devpassword@localhost:5432/mana_platform go run ./cmd/server",
"dev:crawler": "cd services/mana-crawler && go run ./cmd/server",
"dev:credits": "cd services/mana-credits && bun run --watch src/index.ts",
"dev:notify": "cd services/mana-notify && go run ./cmd/server",
"questions:dev": "turbo run dev --filter=questions...",

View file

@ -29,7 +29,7 @@ func Load() *Config {
return &Config{
Port: envutil.GetInt("PORT", 3023),
DatabaseURL: envutil.Get("DATABASE_URL", "postgresql://mana:devpassword@localhost:5432/mana"),
DatabaseURL: envutil.Get("DATABASE_URL", "postgresql://mana:devpassword@localhost:5432/mana_platform"),
RedisHost: envutil.Get("REDIS_HOST", "localhost"),
RedisPort: envutil.GetInt("REDIS_PORT", 6379),
RedisPassword: envutil.Get("REDIS_PASSWORD", ""),