You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
564 B
TypeScript
17 lines
564 B
TypeScript
import _cvat from '../../cvat-core/src/api';
|
|
|
|
const cvat: any = _cvat;
|
|
|
|
const protocol = typeof (process.env.REACT_APP_API_PROTOCOL) === 'undefined'
|
|
? 'http' : process.env.REACT_APP_API_PROTOCOL;
|
|
const host = typeof (process.env.REACT_APP_API_HOST) === 'undefined'
|
|
? 'localhost' : process.env.REACT_APP_API_HOST;
|
|
const port = typeof (process.env.REACT_APP_API_PORT) === 'undefined'
|
|
? '7000' : process.env.REACT_APP_API_PORT;
|
|
|
|
cvat.config.backendAPI = `${protocol}://${host}:${port}/api/v1`;
|
|
|
|
export default function getCore(): any {
|
|
return cvat;
|
|
}
|