added https withe self sign ssl to backentd and healthcheck to frontend

This commit is contained in:
2025-09-10 22:07:15 +02:00
parent cf072cee0c
commit e7b964078c
12 changed files with 234 additions and 19 deletions

View 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';
}
};

View File

@@ -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>

View 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>

View File

@@ -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') }
],
},