mirror of
https://github.com/ChiChou/entdb.git
synced 2026-06-10 23:07:47 +02:00
53aeb562b7
- Add NEXT_PUBLIC_DATA_URL env var pointing to entdb-data Pages - Refactor env.ts: dataURL, withBase (cleaner naming) - Remove data download step from build workflow
6 lines
244 B
TypeScript
6 lines
244 B
TypeScript
export const basePath = process.env.NEXT_PUBLIC_BASE_PATH || "";
|
|
export const dataURL = process.env.NEXT_PUBLIC_DATA_URL || `${basePath}/data`;
|
|
|
|
export const withBase = (path: string) =>
|
|
basePath + (path.startsWith("/") ? path : `/${path}`);
|