Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

windows service? #279

Closed
george-kar opened this issue Nov 9, 2017 · 10 comments
Closed

windows service? #279

george-kar opened this issue Nov 9, 2017 · 10 comments

Comments

@george-kar
Copy link

would it be possible to compile as windows service executable so it can run on the background without user running manually?

@anvilation
Copy link

You might not be able to compile to an exe - but it is not hard to use tools such as winsw (https://github.com/kohsuke/winsw) to install them as a service.

@mpathy
Copy link

mpathy commented Nov 10, 2017

Look here: https://github.com/coreybutler/node-windows (or node-linux, or node-osx respectively)
But I didnt try if it works with pkg, only with enclose..

@serkanp
Copy link

serkanp commented Nov 17, 2017

i am using nssm.exe (non sucking service manager) for more then 5 years on 5.000 device :)
it works without any problem.

@george-kar
Copy link
Author

@serkanp but you ship your js code with it. its not packed inside an exe, right?

@anvilation
Copy link

You can still ship your exe, but then use your installer to run the nssm command as part of the install (Wix)

@serkanp
Copy link

serkanp commented Nov 18, 2017

@george-kar , nssm makes any console exe run as Service.
So compile Your nodejs with pkg and get exe
Then with nssm, make it service

@olehs
Copy link

olehs commented Oct 26, 2018

@serkanp , I have a problem with stopping the service with nssm. Do you change default settings on Shutdown tab? I tried all combinations - nodejs app stops working, but the service never stops

@hipstersmoothie
Copy link
Contributor

duplicate of #137

@introspection3
Copy link

,nssm 使任何控制台 exe 作为 Service 运行。所以用pkg编译你的nodejs并得到exe,然后用nssm,让它服务

any exe can use nssm ,except pkg's exe

@introspection3
Copy link

please don't say any bad suggestion about pkg can use nssm

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants