Backend GKE Deploy, access key for backend
- Configs and automation for deploying backend to GKE - First steps to adding an optional token check for requests to backend - First steps frontend sending optional token to backend when configured
This commit is contained in:
parent
0fedaef537
commit
e6c2042df6
17 changed files with 296 additions and 39 deletions
20
ui/lib/config.ts
Normal file
20
ui/lib/config.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
interface Config {
|
||||
GENERAL: {
|
||||
SUPER_SECRET_KEY: string;
|
||||
NEXT_PUBLIC_API_URL: string;
|
||||
};
|
||||
}
|
||||
|
||||
const loadEnv = () => {
|
||||
return {
|
||||
GENERAL: {
|
||||
SUPER_SECRET_KEY: process.env.SUPER_SECRET_KEY!,
|
||||
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL!,
|
||||
NEXT_PUBLIC_WS_URL: process.env.NEXT_PUBLIC_WS_URL!
|
||||
},
|
||||
} as Config;
|
||||
};
|
||||
|
||||
export const getAccessKey = () => loadEnv().GENERAL.SUPER_SECRET_KEY;
|
||||
|
||||
export const getBackendURL = () => loadEnv().GENERAL.NEXT_PUBLIC_API_URL;
|
Loading…
Add table
Add a link
Reference in a new issue