File size: 442 Bytes
a5d1c1b
 
 
 
 
 
 
 
 
 
 
 
61b1da1
a5d1c1b
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import dotenv from 'dotenv';

dotenv.config();

export interface AppConfig {
  port: number;
  githubToken?: string;
  cacheTtlMs: number;
  nodeEnv: string;
}

export const config: AppConfig = {
  port: parseInt(process.env.API_PORT || process.env.PORT || '3000', 10),
  githubToken: process.env.GITHUB_TOKEN || undefined,
  cacheTtlMs: parseInt(process.env.CACHE_TTL_MS || '60000', 10),
  nodeEnv: process.env.NODE_ENV || 'development',
};