5 lines
202 B
TypeScript
5 lines
202 B
TypeScript
export function applicationUrl(path: string, baseUrl = process.env.APP_URL) {
|
|
if (!baseUrl) throw new Error("APP_URL is required to build public application URLs");
|
|
return new URL(path, baseUrl);
|
|
}
|