+
+

We're sorry, we're not able to retrieve this information at the moment, please try back later

+
+ +
+
Loading...
+
+ API says: {{ info }} +
+
@@ -16,6 +26,7 @@ import Header from '@/components/Header.vue' import Map from '@/components/Map.vue' import LogEntryForm from '@/components/LogEntryForm.vue' +import axios from 'axios' export default { name: 'Home', @@ -23,6 +34,26 @@ export default { Header, Map, LogEntryForm + }, + data () { + return { + info: null, + loading: true, + errored: false + } + }, + mounted () { + const URI = process.env.URI || 'http://localhost:4000' + axios + .get(`${URI}/`) + .then(response => { + this.info = response.data.msg + }) + .catch(error => { + console.log(error) + this.errored = true + }) + .finally(() => { this.loading = false }) } }