chore(tools): generic env variable for challenge editor api location (#53179)

This commit is contained in:
Krzysztof G
2024-01-19 01:19:49 +01:00
committed by GitHub
parent f1556c6a0f
commit 326d15da99
4 changed files with 4 additions and 3 deletions

View File

@@ -27,7 +27,7 @@ tasks:
export HOME_LOCATION=$(gp url 8000)
export API_LOCATION=$(gp url 3000)
export CYPRESS_BASE_URL=$(gp url 8000)
export REACT_APP_CHALLENGE_EDITOR_API_LOCATION=$(gp url 3200)
export CHALLENGE_EDITOR_API_LOCATION=$(gp url 3200)
export CHALLENGE_EDITOR_CLIENT_LOCATION=$(gp url 3300)
' >> ~/.bashrc;
exit;

View File

@@ -1 +1 @@
VITE_CHALLENGE_EDITOR_API_LOCATION=http://localhost:3200
CHALLENGE_EDITOR_API_LOCATION=http://localhost:3200

View File

@@ -6,4 +6,4 @@ export const handleRequest = (makeRequest: () => Promise<Response>) => () => {
};
export const API_LOCATION = import.meta.env
.VITE_CHALLENGE_EDITOR_API_LOCATION as string;
.CHALLENGE_EDITOR_API_LOCATION as string;

View File

@@ -5,6 +5,7 @@ import react from '@vitejs/plugin-react';
export default defineConfig({
base: '/',
plugins: [react()],
envPrefix: 'CHALLENGE_EDITOR_',
server: {
port: 3300
}