Skip to content

Instantly share code, notes, and snippets.

@Dirk94
Created March 14, 2021 11:57
Show Gist options
  • Save Dirk94/1eb09b5a69ee75d44eec840b32a59c47 to your computer and use it in GitHub Desktop.
Save Dirk94/1eb09b5a69ee75d44eec840b32a59c47 to your computer and use it in GitHub Desktop.
<template>
<div id="app" style="font-size: 24px;">
<p>Quote of the day:</p>
<p>
{{ quote }}
</p>
</div>
</template>
<script>
import axios from 'axios';
export default {
data() { return { quote: null, } },
async mounted() {
const response = await axios.get("http://localhost:3000/quote")
this.quote = response.data.quote;
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment