Skip to content

TaskView is a self-hosted project and task management platform focused on clarity, ownership, and control. TaskView is built for teams that want a transparent, self-hosted alternative to SaaS task managers.

308 B
Raw Blame
type TaskViewRuntimeConfig = {
  apiUrl?: string
}

declare global {
  interface Window {
    __TASKVIEW_CONFIG__?: TaskViewRuntimeConfig
  }
}

export const getConfiguredApiUrl = (): string | null => {
  const url = window.__TASKVIEW_CONFIG__?.apiUrl?.trim()
  return url ? url.replace(/\/+$/, '') : null
}