add new websocket http rest and notify components

This commit is contained in:
Adrian Zürcher
2025-05-28 21:54:43 +02:00
parent 491ca72140
commit d7565ed09c
10 changed files with 217 additions and 42 deletions

21
src/boot/axios.ts Normal file
View File

@@ -0,0 +1,21 @@
import { boot } from 'quasar/wrappers';
import axios from 'axios';
const host = window.location.hostname;
const port = 8100;
const baseURL = `http://${host}:${port}`;
const api = axios.create({
baseURL: baseURL,
timeout: 10000,
headers: {
'Content-Type': 'application/json',
},
});
export default boot(({ app }) => {
app.config.globalProperties.$axios = axios;
app.config.globalProperties.$api = api;
});
export { axios, api };