Files
the-nexus/electron-main.js

13 lines
358 B
JavaScript
Raw Normal View History

const { app, BrowserWindow, ipcMain } = require('electron')
const { exec } = require('child_process')
// MemPalace integration
ipcMain.handle('exec-python', (event, command) => {
return new Promise((resolve, reject) => {
exec(command, (error, stdout, stderr) => {
if (error) return reject(error)
resolve({ stdout, stderr })
})
})
})