procyon/app.config.ts
Roman Jaroš e2fa8c36eb DEV;Fetch
2019-05-05 20:11:21 +02:00

35 lines
546 B
TypeScript

interface AppConfig {
SELENIUM_IP: string;
SELENIUM_PORT: number;
CLIENT_PORT?: number;
SERVER_IP: string;
}
let config: AppConfig = {
SELENIUM_IP: '192.168.0.40',
SELENIUM_PORT: 4444,
SERVER_IP: 'localhost',
CLIENT_PORT: 80,
};
// API and E2E tests
if (process.env.APP_ENV === 'CI') {
config = {
...config,
SERVER_IP: '192.168.0.40',
CLIENT_PORT: 89,
}
}
// start server with this setting
if (process.env.APP_ENV === 'test') {
config = {
...config,
SERVER_IP: '0.0.0.0',
CLIENT_PORT: 89,
}
}
export default config;