Posts

Showing posts with the label electron-builder

Embed Mongodb with Electron

Image
Embed Mongodb with Electron I am keeping MongoDB source code inside electron source code and running MongoDB using this command : const app = require('electron').app; const child_process = require('child_process'); const dbInstanceDir = app.getAppPath(); const startMongo = dbInstanceDir + mongodb/bin/mongod --dbpath mydbpath --port 27017 --logpath mylogfile child_process.exec(startMongo, (error, stdout, stderr) => { }); Above command is working while development but it not working after bundling. I am using electron builder to make bundle. MongoDB source code is at root level. Check in the asar file if there is or not the Mongo folder – Leonardo Buscemi 2 days ago Yes, it's there. – Rohit 2 days ago ...