Run a typescript project as a windows service

44 views Asked by At

I have a typescript project that I want to run as a service on a machine, and to be able to distribute it on any machine without needing an installation of npm / node on the target machine. I am currently doing this setup:

  • Run tsc on my project
  • Put on a zip folder a copy of node.exe and nssm.exe, my project turned into js, and the necessary node_modules

On the installation I created a script so that it setups correctly nssm and does everything. This works, but putting the node_modules like this with all the executables seem quite dirty. I before tried doing things with pkg, but it is deprecated now. I was wondering if there was more reasonable solutions.

Thanks

0

There are 0 answers