We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ce842c commit 732e770Copy full SHA for 732e770
.github/workflows/test.yml
@@ -14,6 +14,7 @@ jobs:
14
NODE_ENV: test
15
MONGO_TEST_URI: ${{ secrets.MONGO_TEST_URI }}
16
JWT_SECRET: ${{ secrets.JWT_SECRET }}
17
+ VITE_API_URL: ${{ secrets.VITE_API_URL }}
18
19
steps:
20
- name: Checkout repository
client/src/utils/api.js
@@ -1,7 +1,11 @@
1
import axios from 'axios';
2
3
+if (!import.meta.env.VITE_API_URL) {
4
+ throw new Error('VITE_API_URL is not defined');
5
+}
6
+
7
const API = axios.create({
- baseURL: import.meta.env.VITE_API_URL || '/api',
8
+ baseURL: import.meta.env.VITE_API_URL,
9
});
10
11
// Request interceptor to inject token
0 commit comments