Files
AppFlowy-Web/deploy/config.ts
Nathan.fooo 46c2593183 chore: fix namespace check (#196)
* chore: fix namespace check

* chore: lint

* chore: add test
2025-12-09 18:37:59 +08:00

14 lines
664 B
TypeScript

import path from 'path';
import fs from 'fs';
// In production, dist is copied to deploy/dist. In dev, it's at project root.
const prodDistDir = path.join(__dirname, 'dist');
const devDistDir = path.join(__dirname, '..', 'dist');
export const distDir = fs.existsSync(prodDistDir) ? prodDistDir : devDistDir;
export const indexPath = path.join(distDir, 'index.html');
export const baseURL = process.env.APPFLOWY_BASE_URL as string;
// Used when a namespace is requested without /publishName; users get redirected to the
// public marketing site if the namespace segment is empty (see redirect in publish route).
export const defaultSite = 'https://appflowy.com';