-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathapi-config.ts
37 lines (34 loc) · 1.1 KB
/
api-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
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 { default as notifi } from './notifi';
import opensearch from './opensearch';
import dynamodb from './dynamodb';
import launchdarkly from './launchdarkly';
import { default as redis } from './redis';
export { default as validate } from './validationSchema';
export { TypeOrmConfigService } from './typeorm-config.service';
export { CacheConfigService } from './cache';
const api = registerAs('api', () => {
return {
port: parseInt(process.env.PORT, 10),
rateTtl: parseInt(process.env.API_RATE_TTL, 10) || 60,
rateLimit: parseInt(process.env.API_RATE_LIMIT, 10) || 5,
walletCallbackUrl: process.env.WALLET_CALLBACK_URL,
admins: process.env.ADMIN_ACCOUNTS.split(','),
};
});
export default [
api,
redis,
configuration,
database,
nearConfig,
databaseNearIndexer,
notifi,
opensearch,
dynamodb,
launchdarkly,
];