mirror of
https://github.com/ChiChou/entdb.git
synced 2026-06-11 07:17:47 +02:00
12 lines
299 B
TypeScript
12 lines
299 B
TypeScript
export const basePath = process.env.NEXT_PUBLIC_BASE_PATH || "";
|
|
|
|
export function addBasePath(path: string) {
|
|
let prefixed = path;
|
|
if (!prefixed.startsWith("/")) prefixed = `/${prefixed}`;
|
|
return basePath + prefixed;
|
|
}
|
|
|
|
export function dataBaseURL(): string {
|
|
return addBasePath("/data");
|
|
}
|