I have created an Electron application and now I want to run this application as window service. I try to search for it and ended up with a npm called “npm install os-service”, I tried to install it but shows an error. I want to know that is there any other way to achieve my goal? Do anyone have any solution for this??
What is the error? As a general rule, Windows services cannot have a UI, which I presume your app does. Can you describe your ultimate goal? Maybe there is a way to achieve it without using a service.
What does your error say? You must understand that your service would have to run apart from your app UI.
Hi. This is absolutely solvable. I think even the way you’re doing it depending on the complexity.
We just need more information about the underlying architecture of your Electron application. Have you abstracted your UI from your business L and data store? If not already, just gut the BL (don’t worry, we all have similar code in separate places:) then set up a cloudant cloud DB (or other - I’m using IBM tech as a constant for my sugession ), port your Electon DB to Couch(well, it’s a set up reall) and they sync vey well zero code if need be - ‘offline first’ that new idea that’s been around since 71.
Then Deploy your gutted business layer to a BlueMix server- (changes from cloudant, that is your cloud data store) if electron worked with Couch then zero model code change needed, throw a simple facade over the business layer that will expose everything to a rest API m, handle the request/responses using 98% of your Electron app.
You may be way beyond this, but just in case—here is some new old tech that everyone likes now and is quite efficient…
. Think about “what functionality in my program can execute independently, in parallel with any other process and remain virtually stateless during and after execution?” - if you have an answer to this question write a Lambda and deploy to Open Whisk - again IBM, but staying consistent.
And now you have a semi - ‘server-less’ architecture as well. At least that’s the word now for pay as you go faas…
Amazon and google are a fine Solution to achieve the above, and have used them plenty, but IBM has really stepped up with their game. I’m a new fan / they will be my new go to for all future projects when it’s crucial that I work more effect, have better tools at my disposal, can write in any language I want seamlessly and not rip my eyes out in the process.