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
+1
View File
@@ -6,6 +6,7 @@
<title>Papercrate</title>
</head>
<body>
<script src="/config.js"></script>
<main id="app"></main>
</body>
</html>
+6 -1
View File
@@ -22,7 +22,12 @@ import {
} from 'react-router-dom';
import './styles.css';
const API_ROOT = (process.env.API_BASE_URL || '').replace(/\/$/, '');
const runtimeApiBase =
typeof window !== 'undefined' && window.__PAPERCRATE_API_BASE_URL
? window.__PAPERCRATE_API_BASE_URL
: '';
const API_ROOT = (runtimeApiBase || process.env.API_BASE_URL || '').replace(/\/$/, '');
const api = axios.create({
baseURL: API_ROOT ? `${API_ROOT}/api` : '/api',