27 lines
803 B
TypeScript
27 lines
803 B
TypeScript
import axios from 'axios';
|
|
import React from 'react';
|
|
import ReactDOM from 'react-dom';
|
|
import App from './client/App';
|
|
import './index.css';
|
|
import * as serviceWorker from './client/serviceWorker';
|
|
import { API_PORT } from './core/constants/urls';
|
|
|
|
const isDevelopmentMode = process.env.NODE_ENV === 'development';
|
|
|
|
if (isDevelopmentMode) {
|
|
console.log(window.location);
|
|
axios.defaults.baseURL = `http://${window.location.hostname}:${API_PORT}`;
|
|
}
|
|
|
|
ReactDOM.render(
|
|
// <React.StrictMode>
|
|
<App />,
|
|
// </React.StrictMode>
|
|
document.getElementById('root'),
|
|
);
|
|
|
|
// If you want your app to work offline and load faster, you can change
|
|
// unregister() to register() below. Note this comes with some pitfalls.
|
|
// Learn more about service workers: https://bit.ly/CRA-PWA
|
|
serviceWorker.unregister();
|