37 lines
636 B
TypeScript
37 lines
636 B
TypeScript
interface AppConfig {
|
|
BASE_ENDPOINT_URL: string;
|
|
CLIENT_PORT?: number;
|
|
SELENIUM_IP: string;
|
|
SELENIUM_PORT: number;
|
|
SERVER_IP: string;
|
|
}
|
|
|
|
let config: AppConfig = {
|
|
SELENIUM_IP: '192.168.0.40',
|
|
SELENIUM_PORT: 4444,
|
|
|
|
SERVER_IP: 'localhost',
|
|
CLIENT_PORT: 80,
|
|
|
|
BASE_ENDPOINT_URL: 'https://jsonplaceholder.typicode.com',
|
|
};
|
|
|
|
// 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;
|