Browse Source

configファイルにAPP_ENVを追加

develop
sosuke.iwabuchi 2 years ago
parent
commit
d68d7b8034
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      src/config.ts

+ 9
- 0
src/config.ts View File

@@ -1,3 +1,12 @@
function getEnv() {
const e = process.env.REACT_APP_ENV;
if (e === "local") return e;
if (e === "staging") return e;
if (e === "production") return e;
return "other";
}

export const APP_ENV: "local" | "staging" | "production" | "other" = getEnv();
// API // API
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
export const HOST_API = process.env.REACT_APP_HOST_API_KEY || ""; export const HOST_API = process.env.REACT_APP_HOST_API_KEY || "";

Loading…
Cancel
Save