added https withe self sign ssl to backentd and healthcheck to frontend
This commit is contained in:
18
frontend/src/boot/healthcheck.js
Normal file
18
frontend/src/boot/healthcheck.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import axios from "axios";
|
||||
|
||||
export default async () => {
|
||||
|
||||
|
||||
try {
|
||||
|
||||
const response = await axios.get("https://localhost:5555/api/healthcheck");
|
||||
|
||||
if (!response.data || response.data.status !== "ok") {
|
||||
console.log("a")
|
||||
window.location.href = '/#/error?msg=API%20unreachable';
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
window.location.href = '/#/error?msg=API%20unreachable';
|
||||
}
|
||||
};
|
||||
@@ -5,7 +5,7 @@
|
||||
<q-header elevated>
|
||||
<q-toolbar>
|
||||
<q-btn flat dense round icon="menu" @click="drawer = !drawer" />
|
||||
<q-toolbar-title>Hackathon 25 | Digitale Helfer für Dart</q-toolbar-title>
|
||||
<q-toolbar-title>Hackathon 25 | Digitale Helfer für Dart (Navbar ist nur fürs testen da)</q-toolbar-title>
|
||||
</q-toolbar>
|
||||
</q-header>
|
||||
|
||||
|
||||
13
frontend/src/pages/ErrorPage.vue
Normal file
13
frontend/src/pages/ErrorPage.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<div class="fullscreen bg-red-5 text-white flex flex-center column">
|
||||
<div class="text-h5 mb-4">⚠ Error</div>
|
||||
<div class="text-subtitle1">{{ message }}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const route = useRoute()
|
||||
const message = route.query.msg || 'An unknown error occurred.'
|
||||
</script>
|
||||
@@ -6,7 +6,9 @@ const routes = [
|
||||
{ path: '', component: () => import('pages/IndexPage.vue') },
|
||||
{ path: 'test_DartPicker', component: () => import('pages/testDartPickerPage.vue') },
|
||||
{ path: 'test_NumbersPage', component: () => import('pages/testNumbersPage.vue') },
|
||||
{ path: 'test_WebSpeechApi', component: () => import('pages/testWebSpeechApi.vue') }
|
||||
{ path: 'test_WebSpeechApi', component: () => import('pages/testWebSpeechApi.vue') },
|
||||
|
||||
{ path: 'error', component: () => import('pages/ErrorPage.vue') }
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user