Move software files one directory up, Readme

This commit is contained in:
2024-11-19 16:51:28 +01:00
parent 9fa2b753ec
commit b347df7c6e
329 changed files with 255 additions and 31 deletions

48
electron/index.ts Normal file
View File

@@ -0,0 +1,48 @@
const { app, BrowserWindow } = require("electron");
const path = require("path");
const backend = require('./../backend/server')
/**
* Create the application window
*/
function createWindow() {
const win = new BrowserWindow({
width: 1400,
height: 800,
minWidth: 800,
minHeigth: 600,
webPreferences: {
preload: path.join(__dirname, "preload.js"),
},
});
// Load HTML entry point
win.loadFile("build/src/vite/index.html");
// Maximize window
win.maximize()
// Remove menu bar
win.removeMenu()
}
app.whenReady().then(() => {
createWindow();
app.on("activate", () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
}
});
});
app.on("window-all-closed", () => {
if (process.platform !== "darwin") {
app.quit();
}
// Close the expressjs backend server on application termination
backend.close(() => {
process.exit(0)
})
});