blob: 63818541d9aaf43cd00a015df3dfdfb392df986c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/*
* Authors: see git history
*
* Copyright (c) 2010 Authors
* Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details.
*
*/
import axios from 'axios';
import flaskserverport from './flaskserverport.json'
if (flaskserverport.port === undefined) {
var theflaskport = window.inkstitchAPI.flaskport()
console.log("Installed mode")
console.log(theflaskport)
} else {
var theflaskport = flaskserverport.port
console.log("Dev mode")
console.log(theflaskport)
}
export const inkStitch = axios.create({
baseURL: `http://127.0.0.1:${theflaskport}`
})
|