by trewqasdf on 11/1/23, 1:18 PM with 0 comments
Instead of being smart and writing the app in C# and get the full tooling of Microsoft... I choose to do a modern web app with Node.js and React.
I thought, how hard can it be to package it into a Windows service?
It turned out to be pretty hard. And not for any good reason, just a disparate ecosystem.
Finally, I managed to do a basic app and package it as an .msi, but all my creative energy to continue was gone.
To salvage a little of the project, I decided to upload a complete template app to Github (including build scripts). If someone wants to do the same thing, they just might save some time! The code is MIT licensed.
Three essential things I struggled with were: - How to make the Node.js-app write local files (textfiles, SQLite..) - Node.js interacting with the Windows service daemon - Set up the service automatically when running the installer, including ARGV