Branchwell

Lumen & Gesso / website · lumengesso.com / app / config.ts

Raw 690 B on f4d070c0cd6547ed6432bda0f7f1dc2cb2181b18
1// Site-wide server config.
2
3// Coming-soon gate. While on, every route renders the pre-launch holding
4// page instead of the live site. The production deploy is gated by
5// default; preview deploys and local dev show the real site so the studio
6// can keep building. Override in any environment with the COMING_SOON env
7// var ("true" forces the holding page, "false" forces the live site).
8function resolveComingSoon(): boolean {
9 const flag = process.env.COMING_SOON;
10 if (flag === 'true') return true;
11 if (flag === 'false') return false;
12 return (process.env.VERCEL_ENV ?? process.env.CLOUDFLARE_DEPLOYMENT_ENV) === 'production';
13}
14
15export const COMING_SOON = resolveComingSoon();