Skip to main content
Glama
test-react-electron.cjs1.19 kB
const { app, BrowserWindow } = require('electron'); let mainWindow; function createWindow() { mainWindow = new BrowserWindow({ width: 900, height: 700, webPreferences: { nodeIntegration: false, contextIsolation: true, enableRemoteModule: false, webSecurity: true }, show: false }); // Load the React test app mainWindow.loadFile('react-test-app.html'); // Show window when ready mainWindow.once('ready-to-show', () => { mainWindow.show(); }); // Open DevTools for debugging mainWindow.webContents.openDevTools(); mainWindow.on('closed', () => { mainWindow = null; }); } // Enable remote debugging for MCP server app.commandLine.appendSwitch('remote-debugging-port', '9222'); app.whenReady().then(() => { createWindow(); }); app.on('window-all-closed', () => { if (process.platform !== 'darwin') { app.quit(); } }); app.on('activate', () => { if (BrowserWindow.getAllWindows().length === 0) { createWindow(); } }); // Handle errors silently process.on('uncaughtException', () => { // Handle error silently }); process.on('unhandledRejection', () => { // Handle error silently });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/halilural/electron-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server