summaryrefslogtreecommitdiff
path: root/electron/src/lib/api.js
blob: b6aa74e2067da2166cf51afbb3a6df1f9705e897 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
 * Authors: see git history
 *
 * Copyright (c) 2010 Authors
 * Licensed under the GNU GPL version 3.0 or later.  See the file LICENSE for details.
 *
 */

const axios = require('axios')
const queryString = require('query-string')

var port = queryString.parse(global.location.search).port

module.exports = axios.create({
  baseURL: `http://127.0.0.1:${port}/`
})