I have packaged my electronic application. When I launch my electronic application, I want my MongoDB service to automatically start on a locally installed system. How can I achieve this with my node code?
Hope this helps you.
spawn = require("child_process").spawn, mongo_server = spawn("mongod.exe", ["c:/mongo_path"], { cwd: process.cwd() })
If you installed MongoDB using agt-get (or a similar manager), it may start automatically when the system boots. I used an electron, but if node modules can be used, you can do child_process.exec when starting your project.
Source: https://habr.com/ru/post/1619461/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1619456/where-is-the-log-for-azure-service-bus-topic-subscriptions-messages-sentdelivered&usg=ALkJrhjavlU9YEXy0DxXVpg19qxuhPvYQwReducing the steps in the HTML output of a cucumber - htmldjango: there is no x migration in application x Migration class - pythonPaste Google Docs response form - google-docsHow to getText from forbidden input field in selenium java - javaSustainability Design - c #Like the style of PreferenceFragmentCompat - androidangular/ионные атрибуты добавляются условно для - angularjsJS & ES6: accessing static fields from a class - javascriptHow to pass strings between D and C ++? - c ++All Articles