Skip to content

⭐️⭐️⭐️ Open-source, self-hosted alternative to Linear and Plane. Project management and issue tracking where teams and AI agents work side by side to plan and ship products.

306 B
Raw Blame
// Reads a positive-integer env var, falling back to `fallback` when it is unset,
// empty, non-numeric, or not greater than zero.
export function intEnv(name: string, fallback: number): number {
  const value = Number(process.env[name]);
  return Number.isFinite(value) && value > 0 ? value : fallback;
}