-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathindexer-processor-config.ts
40 lines (36 loc) · 1.11 KB
/
indexer-processor-config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { parseRedisUrl } from 'parse-redis-url-simple';
import { registerAs } from '@nestjs/config';
import { default as configuration } from './configuration';
import { default as database } from './database';
import databaseNearIndexer from './database-near-indexer';
import { default as nearConfig } from './near-config';
import opensearch from './opensearch';
import dynamodb from './dynamodb';
import launchdarkly from './launchdarkly';
export { default as validate } from './validationSchema';
export { TypeOrmConfigService } from './typeorm-config.service';
export { CacheConfigService } from './cache';
const indexerProcessor = registerAs('indexer-processor', () => {
const {
host: indexerRedisHost,
port: indexerRedisPort,
database: indexerRedisDb,
password: indexerRedisPassword,
} = parseRedisUrl(process.env.REDIS_CONNECTION_STRING)?.[0];
return {
indexerRedisHost,
indexerRedisPort,
indexerRedisDb,
indexerRedisPassword,
};
});
export default [
configuration,
database,
nearConfig,
databaseNearIndexer,
indexerProcessor,
opensearch,
dynamodb,
launchdarkly,
];