<template>
  <div class="app">
    <h1>{{ message }}</h1>
  </div>
</template>

<script>
export default {
  data() {
    return {
      message: 'Loading...'
    }
  },
  mounted() {
    fetch('http://localhost:3000/api/message')
      .then(res => res.json())
      .then(data => {
        this.message = data.message;
      });
  }
}
</script>

<style>
.app {
  font-family: Arial, sans-serif;
  text-align: center;
  margin-top: 50px;
}
</style>