17 lines
422 B
TypeScript
17 lines
422 B
TypeScript
import {environment} from '../environments/environment';
|
|
|
|
export class GlobalConstants {
|
|
|
|
public static readonly API_URL = (() => {
|
|
// ... calculate the value and return it
|
|
|
|
if(environment.production) {
|
|
return `${environment.host_name}/api`;
|
|
}else {
|
|
//return `${environment.host_name}:${environment.port}/api`;
|
|
return `/api`; // in serve mode used proxy (proxy.conf.json)
|
|
}
|
|
|
|
})();
|
|
}
|