-
Notifications
You must be signed in to change notification settings - Fork 5
/
env.js
50 lines (46 loc) · 1.97 KB
/
env.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// this file is used to configure different environments. Comment or uncomment as appropriate,
// and add your Forge Keys here
const stgEnvironment = {
name: "stg",
oxygenHost: "https://accounts-staging.autodesk.com",
forgeHost: "https://developer-stg.api.autodesk.com",
forgeKey: "hZy6ABuq8STldhv3X6IDrgyXUOVZZHtW", // TODO: Replace with your Forge Key to develop locally
loginRedirect: "http://localhost:8000",
tandemDbBaseURL: "https://tandem-stg.autodesk.com/api/v1",
tandemDbBaseURL_v2: "https://tandem-stg.autodesk.com/api/v2",
tandemAppBaseURL: "https://tandem-stg.autodesk.com/app",
dtLmvEnv: "DtStaging",
};
const prodEnvironment = {
name: "prod",
oxygenHost: "https://accounts.autodesk.com",
forgeHost: "https://developer.api.autodesk.com",
forgeKey: "DUmM9UILrlq43GT7U48SDnG9lwAgYToc", // TODO: Replace with your Forge Key to develop locally
loginRedirect: "http://localhost:8000",
tandemDbBaseURL: "https://tandem.autodesk.com/api/v1",
tandemDbBaseURL_v2: "https://tandem.autodesk.com/api/v2",
tandemAppBaseURL: "https://tandem.autodesk.com/app",
dtLmvEnv: "DtProduction",
};
const githubPages = {
name: "githubPages",
oxygenHost: "https://accounts.autodesk.com",
forgeHost: "https://developer.api.autodesk.com",
forgeKey: "DUmM9UILrlq43GT7U48SDnG9lwAgYToc", // Do not replace, this is for deployed version
loginRedirect: "https://autodesk-tandem.github.io/sample-emb-viewer/index.html",
tandemDbBaseURL: "https://tandem.autodesk.com/api/v1",
tandemDbBaseURL_v2: "https://tandem.autodesk.com/api/v2",
tandemAppBaseURL: "https://tandem.autodesk.com/app",
dtLmvEnv: "DtProduction",
};
export function getEnv() {
if (window.location.hostname === "autodesk-tandem.github.io") {
//console.log("TANDEM_ENV: using GitHubPages environment");
return githubPages;
}
else {
//console.log("TANDEM_ENV: using PROD environment");
return prodEnvironment; // TODO: comment/uncomment as appropriate
//return stgEnvironment;
}
}