57 lines
2.2 KiB
TypeScript
57 lines
2.2 KiB
TypeScript
import { Module } from '@nestjs/common';
|
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
|
import { GeocodingService } from './geocoding.service';
|
|
import { GeocodingInitService } from './geocoding-init.service';
|
|
import { GeocodingController } from './geocoding.controller';
|
|
import { PlaceSyria } from './entities/place-syria.entity';
|
|
import { PlaceJordan } from './entities/place-jordan.entity';
|
|
import { PlaceEgypt } from './entities/place-egypt.entity';
|
|
import { OsmArea } from './entities/osm-area.entity';
|
|
import { OsmPointWithArea } from './entities/osm-point-with-area.entity';
|
|
import { AdminBoundary } from './entities/admin-boundary.entity';
|
|
import { AdminBoundariesService } from './admin-boundaries.service';
|
|
import { JordanResearchService } from './jordan-research.service';
|
|
import { AdministrativeLinkingService } from './administrative-linking.service';
|
|
import { NeighborhoodPoint } from './entities/neighborhood-point.entity';
|
|
import { NeighborhoodPolygon } from './entities/neighborhood-polygon.entity';
|
|
import { MapCandidate } from './entities/map-candidate.entity';
|
|
import { MapRefinementService } from './map-refinement.service';
|
|
import { MapRefinementController } from './map-refinement.controller';
|
|
import { CacheModule } from '@nestjs/cache-manager';
|
|
import * as redisStore from 'cache-manager-redis-store';
|
|
import { IndexRefreshService } from './index-refresh.service';
|
|
|
|
@Module({
|
|
imports: [
|
|
TypeOrmModule.forFeature([
|
|
PlaceSyria,
|
|
PlaceJordan,
|
|
PlaceEgypt,
|
|
OsmArea,
|
|
OsmPointWithArea,
|
|
AdminBoundary,
|
|
NeighborhoodPoint,
|
|
NeighborhoodPolygon,
|
|
MapCandidate
|
|
]),
|
|
CacheModule.register({
|
|
store: redisStore,
|
|
host: process.env.REDIS_HOST || 'localhost',
|
|
port: parseInt(process.env.REDIS_PORT || '6379', 10),
|
|
ttl: 3600, // 1 hour in seconds for version 1-2, or ms for v3
|
|
}),
|
|
],
|
|
controllers: [GeocodingController, MapRefinementController],
|
|
providers: [
|
|
GeocodingService,
|
|
GeocodingInitService,
|
|
AdminBoundariesService,
|
|
JordanResearchService,
|
|
AdministrativeLinkingService,
|
|
MapRefinementService,
|
|
IndexRefreshService
|
|
],
|
|
exports: [GeocodingService, MapRefinementService],
|
|
})
|
|
export class GeocodingModule {}
|