26 lines
723 B
TypeScript
26 lines
723 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_URL } from "./constants/urls";
|
|
|
|
const isDevelopmentMode = process.env.NODE_ENV === "development";
|
|
|
|
if (isDevelopmentMode) {
|
|
axios.defaults.baseURL = API_URL;
|
|
}
|
|
|
|
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();
|