import { registerAs } from '@nestjs/config';

export default registerAs('app', () => ({
  nodeEnv: process.env.NODE_ENV || 'development',
  port: parseInt(process.env.PORT, 10) || 3000,
  apiPrefix: process.env.API_PREFIX || '/api/v1',
  corsOrigin: process.env.CORS_ORIGIN || '*',
  logLevel: process.env.LOG_LEVEL || 'debug',
  metricsEnabled: process.env.METRICS_ENABLED === 'true',
  metricsPort: parseInt(process.env.METRICS_PORT, 10) || 9090,
}));
