frontend api url
ci / docker (backend, backend/Dockerfile, backend) (push) Successful in 15s
ci / docker (frontend, frontend/Dockerfile, frontend) (push) Successful in 32s

This commit is contained in:
2025-10-12 13:40:27 +02:00
parent 9147442822
commit 351d635f39
5 changed files with 29 additions and 4 deletions
+5 -3
View File
@@ -5,8 +5,10 @@ const dotenv = require('dotenv');
const env = dotenv.config({ path: path.resolve(__dirname, '.env.local') }).parsed || {};
const API_BASE_URL =
env.API_BASE_URL || process.env.API_BASE_URL || 'http://127.0.0.1:3000';
const DEFAULT_DEV_API = 'http://127.0.0.1:3000';
const API_BASE_URL = env.API_BASE_URL || process.env.API_BASE_URL || '';
const devServerApiTarget = API_BASE_URL || DEFAULT_DEV_API;
module.exports = {
entry: './src/index.jsx',
@@ -50,7 +52,7 @@ module.exports = {
proxy: [
{
context: ['/api'],
target: API_BASE_URL,
target: devServerApiTarget,
changeOrigin: true,
},
],