Additions Channel Testing
This commit is contained in:
12
env.js
12
env.js
@@ -1,5 +1,7 @@
|
||||
import * as Updates from "expo-updates";
|
||||
|
||||
const ENV = {
|
||||
dev: {
|
||||
test: {
|
||||
API_URL: "https://api.test.imex.online",
|
||||
uri: "https://db.test.bodyshop.app/v1/graphql",
|
||||
wsuri: "wss://db.test.bodyshop.app/v1/graphql",
|
||||
@@ -42,10 +44,10 @@ const ENV = {
|
||||
};
|
||||
|
||||
function getEnvVars() {
|
||||
let env = process.env.NODE_ENV;
|
||||
if (env === null || env === undefined || env === "") return ENV.dev;
|
||||
if (env.indexOf("dev") !== -1) return ENV.dev;
|
||||
if (env.indexOf("prod") !== -1) return ENV.prod;
|
||||
let env = Updates.releaseChannel;
|
||||
if (env === null || env === undefined || env === "") return ENV.test;
|
||||
if (env.indexOf("test") !== -1) return ENV.test;
|
||||
if (env.indexOf("default") !== -1) return ENV.prod;
|
||||
else return ENV.prod;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user