1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00

21 lines
508 B
TypeScript
Raw Normal View History

import {PublicConfigClass} from './ConfigClass';
import {WebConfigLoader} from 'typeconfig/src/WebConfigLoader';
2017-06-04 15:25:08 +02:00
declare module ServerInject {
2018-11-28 23:49:33 +01:00
export const ConfigInject: PublicConfigClass;
2017-06-04 15:25:08 +02:00
}
export let Config = new PublicConfigClass();
2017-07-09 12:03:17 +02:00
if (typeof ServerInject !== 'undefined' && typeof ServerInject.ConfigInject !== 'undefined') {
WebConfigLoader.loadFrontendConfig(Config.Client, ServerInject.ConfigInject);
2017-06-04 15:25:08 +02:00
}
2017-07-09 12:03:17 +02:00
if (Config.Client.publicUrl === '') {
2017-07-09 12:03:17 +02:00
Config.Client.publicUrl = location.origin;
}