MCPcopy
hub / github.com/simstudioai/sim / resolveDbUrl

Function resolveDbUrl

packages/db/connection-url.ts:7–12  ·  view source on GitHub ↗
(
  base: 'DATABASE_URL' | 'DATABASE_REPLICA_URL',
  role: string
)

Source from the content-addressed store, hash-verified

5 * env alone; unset keyed vars preserve the prior single-URL behavior.
6 */
7export function resolveDbUrl(
8 base: 'DATABASE_URL' | 'DATABASE_REPLICA_URL',
9 role: string
10): string | undefined {
11 return process.env[`${base}_${role.toUpperCase()}`] ?? process.env[base]
12}

Callers 3

db.tsFile · 0.90
operations.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected