web-svelte => web

This commit is contained in:
Jan Prochazka
2021-02-20 19:16:05 +01:00
parent daf9e9d18b
commit 321eedefea
38 changed files with 2 additions and 3 deletions

View File

@@ -0,0 +1,21 @@
export default function resolveApi() {
if (window['require']) {
const electron = window['require']('electron');
if (electron) {
const port = electron.remote.getGlobal('port');
if (port) {
return `http://localhost:${port}`;
}
}
}
// // eslint-disable-next-line
// const apiUrl = process.env.REACT_APP_API_URL;
// if (apiUrl) {
// if (apiUrl == 'ORIGIN') return window.location.origin;
// return apiUrl;
// }
return 'http://localhost:3000';
}