Commit 85cfb4f8 authored by Magnus Holm Brunbjerg's avatar Magnus Holm Brunbjerg
Browse files

ip

parent c1c26181
......@@ -8,6 +8,10 @@ const fetch = require('node-fetch')
const app = express()
const port = process.env.PORT
const apiIp = process.env.API_IP
const apiPort = process.env.API_PORT
const apiPath = process.env.API_PATH
app.listen(port, (err) => {
if (err) return console.error(err)
console.log(`Web server startet på http://${require('ip').address()}:${port}`)
......@@ -54,7 +58,7 @@ app.get('/', (req, res, next) => {
// List all experiments
app.get('/experiments', (req, res, next) => {
fetch(`http://${process.env.API_IP}:${process.env.API_PORT}${process.env.API_PATH}/experiments`, {
fetch(`http://${apiIp}:${apiPort}${apiPath}/experiments`, {
method: 'GET',
mode: 'cors',
headers: {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment