diff --git a/src/App.js b/src/App.js index 2e141cb8787eba079aabde9d61c970ef6ec2f314..10c3ec061d2d1e9158d98674dae8e214f685fe17 100644 --- a/src/App.js +++ b/src/App.js @@ -25,7 +25,7 @@ class App extends React.Component { async getDataFromServer(){ try { // Get data from the backend - let res = await axios.get('http://localhost:3001/score/get') + let res = await axios.get('/score/get') let data = res.data console.log(`Data: ${data}`); @@ -53,10 +53,10 @@ class App extends React.Component { const usernameObject = { username: this.state.username } - res = await axios.post('http://localhost:3001/button/push', usernameObject) + res = await axios.post('/button/push', usernameObject) } else{ - res = await axios.post('http://localhost:3001/button/push') + res = await axios.post('/button/push') } let data = res.data