Home / Function/ getBaseUrl() — supabase Function Reference

getBaseUrl() — supabase Function Reference

Architecture documentation for the getBaseUrl() function in command.tsx from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  b0b31295_09d6_092e_8a9b_370c46bdf15d["getBaseUrl()"]
  6dab894a_a956_6f28_44d9_6d3388713095["Command()"]
  6dab894a_a956_6f28_44d9_6d3388713095 -->|calls| b0b31295_09d6_092e_8a9b_370c46bdf15d
  style b0b31295_09d6_092e_8a9b_370c46bdf15d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/learn/components/command.tsx lines 19–28

const getBaseUrl = () => {
  if (process.env.NEXT_PUBLIC_VERCEL_TARGET_ENV === 'production') {
    // we have a special alias for the production environment, added in https://github.com/shadcn-ui/ui/pull/8161
    return `@supabase`
  } else if (process.env.NEXT_PUBLIC_VERCEL_TARGET_ENV === 'preview') {
    return `https://${process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL}`
  } else {
    return 'http://localhost:3004'
  }
}

Subdomains

Called By

Frequently Asked Questions

What does getBaseUrl() do?
getBaseUrl() is a function in the supabase codebase.
What calls getBaseUrl()?
getBaseUrl() is called by 1 function(s): Command.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free