MVP реализации MoexVibe — NestJS бэкенд + React фронтенд + CI/CD #1
25
apps/backend/src/config/configuration.ts
Normal file
25
apps/backend/src/config/configuration.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import { registerAs } from '@nestjs/config';
|
||||
|
||||
export default registerAs('app', () => ({
|
||||
port: parseInt(process.env.PORT || '3000', 10),
|
||||
moex: {
|
||||
baseUrl: process.env.MOEX_BASE_URL || 'https://iss.moex.com/iss',
|
||||
rateLimit: parseInt(process.env.MOEX_RATE_LIMIT || '10', 10),
|
||||
circuitBreakerThreshold: parseInt(
|
||||
process.env.MOEX_CIRCUIT_BREAKER_THRESHOLD || '5',
|
||||
10,
|
||||
),
|
||||
circuitBreakerResetSeconds: parseInt(
|
||||
process.env.MOEX_CIRCUIT_BREAKER_RESET_SECONDS || '30',
|
||||
10,
|
||||
),
|
||||
},
|
||||
cache: {
|
||||
marketDataTtl: parseInt(process.env.CACHE_MARKET_DATA_TTL || '900', 10),
|
||||
historyTtl: parseInt(process.env.CACHE_HISTORY_TTL || '3600', 10),
|
||||
candlesTtl: parseInt(process.env.CACHE_CANDLES_TTL || '3600', 10),
|
||||
securityTtl: parseInt(process.env.CACHE_SECURITY_TTL || '86400', 10),
|
||||
searchTtl: parseInt(process.env.CACHE_SEARCH_TTL || '3600', 10),
|
||||
dividendsTtl: parseInt(process.env.CACHE_DIVIDENDS_TTL || '86400', 10),
|
||||
},
|
||||
}));
|
||||
Loading…
x
Reference in New Issue
Block a user