Merge branch 'AW-31-addEnvVariables' into 'develop'
AW-31-addEnvVariables See merge request witapp/aura-webapp!102
This commit is contained in:
commit
056b6c4f65
6
environments/.env.develop
Normal file
6
environments/.env.develop
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
AURA_API_HOST=https://api-web.aura.wit.life
|
||||||
|
AURA_DAPI_HOST=https://dev.api.aura.witapps.us
|
||||||
|
AURA_SITE_HOST=https://aura.wit.life
|
||||||
|
AURA_PREFIX=api/v1
|
||||||
|
AURA_OPEN_AI_HOST=https://api.openai.com
|
||||||
|
AURA_OPEN_AI_PREFIX=v1
|
||||||
6
environments/.env.production
Normal file
6
environments/.env.production
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
AURA_API_HOST=https://api-web.aura.wit.life
|
||||||
|
AURA_DAPI_HOST=https://api.aura.witapps.us
|
||||||
|
AURA_SITE_HOST=https://aura.wit.life
|
||||||
|
AURA_PREFIX=api/v1
|
||||||
|
AURA_OPEN_AI_HOST=https://api.openai.com
|
||||||
|
AURA_OPEN_AI_PREFIX=v1
|
||||||
@ -7,7 +7,11 @@
|
|||||||
"dev": "vite --host",
|
"dev": "vite --host",
|
||||||
"build": "tsc && vite build",
|
"build": "tsc && vite build",
|
||||||
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview",
|
||||||
|
"start:dev": "vite --host --mode develop",
|
||||||
|
"start:prod": "vite --host --mode production",
|
||||||
|
"build:dev": "tsc && vite build --mode develop",
|
||||||
|
"build:prod": "tsc && vite build --mode production"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@reduxjs/toolkit": "^1.9.5",
|
"@reduxjs/toolkit": "^1.9.5",
|
||||||
|
|||||||
8
src/env.d.ts
vendored
Normal file
8
src/env.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
interface ImportMetaEnv {
|
||||||
|
AURA_API_HOST: string,
|
||||||
|
AURA_DAPI_HOST: string,
|
||||||
|
AURA_SITE_HOST: string,
|
||||||
|
AURA_PREFIX: string,
|
||||||
|
AURA_OPEN_AI_HOST: number,
|
||||||
|
AURA_OPEN_AI_PREFIX: string
|
||||||
|
}
|
||||||
@ -1,17 +1,14 @@
|
|||||||
import type { UserStatus } from "./types";
|
import type { UserStatus } from "./types";
|
||||||
|
|
||||||
const isProduction = import.meta.env.MODE === "production";
|
const environments = import.meta.env
|
||||||
|
|
||||||
const host = "";
|
const host = "";
|
||||||
export const apiHost = "https://api-web.aura.wit.life";
|
export const apiHost = environments.AURA_API_HOST;
|
||||||
const dApiHost = isProduction
|
const dApiHost = environments.AURA_DAPI_HOST
|
||||||
? "https://api.aura.witapps.us"
|
const siteHost = environments.AURA_SITE_HOST
|
||||||
: "https://dev.api.aura.witapps.us";
|
const prefix = environments.AURA_PREFIX;
|
||||||
// const dApiHost = "https://d.api.witapps.us";
|
const openAIHost = environments.AURA_OPEN_AI_HOST;
|
||||||
const siteHost = "https://aura.wit.life";
|
const openAiPrefix = environments.AURA_OPEN_AI_PREFIX;
|
||||||
const prefix = "api/v1";
|
|
||||||
const openAIHost = " https://api.openai.com";
|
|
||||||
const openAiPrefix = "v1";
|
|
||||||
|
|
||||||
const routes = {
|
const routes = {
|
||||||
client: {
|
client: {
|
||||||
|
|||||||
@ -19,4 +19,6 @@ export default defineConfig({
|
|||||||
path: '/hmr/',
|
path: '/hmr/',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
envDir: "./environments",
|
||||||
|
envPrefix: "AURA_"
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user