mirror of
https://github.com/ramvignesh-b/pi-ku.git
synced 2026-05-04 08:56:52 +00:00
10 lines
271 B
TypeScript
10 lines
271 B
TypeScript
export const getBaseUrl = (
|
|
isSslEnabled: boolean,
|
|
domain: string | undefined,
|
|
port: string | undefined,
|
|
): string => {
|
|
const uriScheme = isSslEnabled ? "https" : "http";
|
|
const baseURL = `${uriScheme}://${domain}${port ? `:${port}` : ""}`;
|
|
return baseURL;
|
|
};
|