Acrescentando estruturas e serviços para integração com backend

This commit is contained in:
Matheus Albino Brunhara
2022-04-28 18:31:16 -05:00
parent b3fa01635d
commit 3908f558e5
7 changed files with 113 additions and 16 deletions

19
src/config/api.config.ts Normal file
View File

@@ -0,0 +1,19 @@
import environment from "../constants/environment";
const getBaseUrl = (): string => {
// const { hostname } = window.location;
const { url } = environment;
let apiUrl = null;
// if (hostname === 'projeto-integrado-f-web.herokuapp.com') {
// apiUrl = url.prod;
// } else {
apiUrl = url.local;
// }
return apiUrl;
}
export default { getBaseUrl };