Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions WebAPP/Classes/Base.Class.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import { Html } from "./Html.Class.js";
import { SyncS3 } from "./SyncS3.Class.js";

export class Base {
static HEROKU = 0;
static AWS_SYNC = 0;
//init sync flag to pull from S3 only one time when visit home page
static INIT_SYNC = 1;

static apiUrl() {
if (this.HEROKU == 1) {
return "https://osemosys.herokuapp.com/";
// Reads window.API_BASE_URL injected at deploy time (e.g. via index.html).
// Falls back to window.location.origin for local/standard same-origin deployments.
if (window.API_BASE_URL) {
return window.API_BASE_URL.replace(/\/$/, "") + "/";
}
return `${window.location.origin}/`;
}
Expand Down
Loading