mirror of
https://github.com/AppFlowy-IO/AppFlowy-Web.git
synced 2026-03-13 10:00:26 +08:00
14 lines
664 B
TypeScript
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';
|