<template>
<div>{{ message }}</div>
</template>
<script>
import axios from 'axios';
export default {
data() {
return {
message: ''
}
},
mounted() {
axios.get('/api/message')
.then(response => {
this.message = response.data;
})
.catch(error => {
console.error(error);
});
}
}
</script>