diff --git a/src/GeoLocation.ts b/src/GeoLocation.ts index bfc3306..3d34182 100644 --- a/src/GeoLocation.ts +++ b/src/GeoLocation.ts @@ -160,5 +160,7 @@ class GeoResolverIpInfo implements GeoLocationResolver { export let geoLocationProvider: GeoLocationProvider; -geoLocationProvider = new GeoLocationProvider(); -geoLocationProvider.loadCache(); \ No newline at end of file +export function initializeGeoService() { + geoLocationProvider = new GeoLocationProvider(); + geoLocationProvider.loadCache(); +} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 37571ac..1cd3637 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,5 @@ +import {initializeGeoService} from "./GeoLocation"; + export { ClientServiceLogger, setClientServiceLogger } from "./Logging"; export { ActionResult } from "./Action"; @@ -8,3 +10,7 @@ export * as Messages from "./Messages"; export { ClientServiceInvite, InviteLinkInfo } from "./ClientServiceInvite"; export { ClientServiceConfig, ClientServices, LocalAgent } from "./ClientService"; + +export function initializeClientServices() { + initializeGeoService(); +} \ No newline at end of file