refactor: provide appName

This commit is contained in:
prafull-opensignlabs
2024-09-19 19:07:54 +05:30
parent 4188caed33
commit 4e6477297e
5 changed files with 11 additions and 15 deletions
+1
View File
@@ -2,6 +2,7 @@ import dotenv from 'dotenv';
dotenv.config();
export const cloudServerUrl = 'http://localhost:8080/app';
export const appName = process.env.APP_NAME || 'OpenSign™';
export function customAPIurl() {
const url = new URL(cloudServerUrl);
return url.pathname === '/api/app' ? url.origin + '/api' : url.origin;