File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ export default {
30
30
'~/api/index.js'
31
31
] ,
32
32
33
+ env : {
34
+ baseUrl : process . env . NODE_ENV !== 'production' ? '/v1' : 'http://127.0.0.1:8000/v1'
35
+ } ,
36
+
33
37
/*
34
38
** Customize the progress-bar color
35
39
*/
Original file line number Diff line number Diff line change 1
1
import axios from 'axios'
2
- const baseURL = 'http://127.0.0.1:8000/v1' // Todo: change URL by development/staging/production.
3
- // const baseURL = '/v1'
4
2
5
3
class ApiService {
6
4
constructor ( ) {
7
5
this . instance = axios . create ( {
8
- baseURL
6
+ baseURL : process . env . baseUrl
9
7
} )
10
8
}
11
9
@@ -24,8 +22,6 @@ class ApiService {
24
22
data,
25
23
...config
26
24
} )
27
- // .then(response => response.data)
28
- // .catch(error => error)
29
25
}
30
26
31
27
get ( url , config = { } ) {
You can’t perform that action at this time.
0 commit comments