Closed docclikdev closed 1 year ago
It is possible to set the path of the node executable. However; pkg embeds code into the binary and won't run the way node.exe would on it's own.
The main purpose of this library is to re-use node.exe across multiple processes and/or the ability to upgrade node.exe without changing any of the app code. It is not designed to be standalone.
You may be able to set the path to the node executable by referencing pkg, but I don't know how to do that and it's not in the scope of this project.
I am using babel to build and pkg to create a .exe and compressing with Brotli. The windows machine I am running the exe on does not have node installed, but pkg takes care of that. My script looks like the following:
"pkg ./dist/windowsService.js --target node18-win-x64 -o abeldent-middleware.exe --compress Brotli"
and windowsService.js looks like the following:
I know it is recommended to have a global installation, but is there any way of using it packaged within? The goal is to just run the .exe file and have it run as a service.