interstellar_ai/main.js

29 lines
574 B
JavaScript
Raw Permalink Normal View History

2024-09-25 08:54:24 +02:00
const { app, BrowserWindow } = require('electron');
function createWindow() {
const win = new BrowserWindow({
2024-10-02 09:43:22 +02:00
width: 1280,
height: 720,
2024-09-25 08:54:24 +02:00
webPreferences: {
nodeIntegration: true,
},
2024-10-02 09:43:22 +02:00
autoHideMenuBar: true,
2024-09-25 08:54:24 +02:00
});
win.loadURL('http://localhost:3000');
}
app.whenReady().then(createWindow);
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit();
}
});
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
}
});