Skip to content
Snippets Groups Projects
Commit 0aecaccb authored by Janne's avatar Janne
Browse files

Changed the backend url in the correct form for production build

parent f9eda880
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ class App extends React.Component { ...@@ -25,7 +25,7 @@ class App extends React.Component {
async getDataFromServer(){ async getDataFromServer(){
try { try {
// Get data from the backend // 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 let data = res.data
console.log(`Data: ${data}`); console.log(`Data: ${data}`);
...@@ -53,10 +53,10 @@ class App extends React.Component { ...@@ -53,10 +53,10 @@ class App extends React.Component {
const usernameObject = { const usernameObject = {
username: this.state.username username: this.state.username
} }
res = await axios.post('http://localhost:3001/button/push', usernameObject) res = await axios.post('/button/push', usernameObject)
} }
else{ else{
res = await axios.post('http://localhost:3001/button/push') res = await axios.post('/button/push')
} }
let data = res.data let data = res.data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment