Created
March 14, 2021 11:57
-
-
Save Dirk94/1eb09b5a69ee75d44eec840b32a59c47 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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