Install a NodeJS App as a Windows System Service

250 views
Skip to first unread message

AJ ONeal

unread,
Apr 23, 2013, 12:57:05 PM4/23/13
to node.js mailing list
I've had quite a headache trying to figure this out - mostly due to not knowing where stderr / stdout goes on windows (and hence not being able to debug failure for the service to start).


I've been able to install a node app in C:\AppName, but not C:\Program Files\AppName (it will start when run manually from PowerShell, but not automatically from NSSM or node-windows)

For those that are intending to do this, hopefully that helps.
For those that are expert, I'd appreciate it if you'd peek at my script and look for any obvious errors. Maybe a windows guy would know what I'm doing wrong.

If you care to patch the docs:

AJ ONeal

Stephen Vickers

unread,
Apr 24, 2013, 3:11:55 AM4/24/13
to nod...@googlegroups.com
The windows-service module can handle spaces in paths:

AJ ONeal

unread,
Apr 24, 2013, 2:00:35 PM4/24/13
to node.js mailing list
On Wed, Apr 24, 2013 at 1:11 AM, Stephen Vickers <vortex...@gmail.com> wrote:
The windows-service module can handle spaces in paths:


Would you mind testing it with my example project?

Someone else was telling me that they've had no problem with NSSM or node-windows installing to Program Files, but I've tried 11 ways from Sunday to get various configurations working and I'm obviously doing something wrong.

AJ ONeal

José F. Romaniello

unread,
Apr 24, 2013, 2:04:47 PM4/24/13
to nod...@googlegroups.com

2013/4/24 AJ ONeal <cool...@gmail.com>

Someone else was telling me that they've had no problem with NSSM or node-windows installing to Program Files,

+1, it works perfectly fine for me.

I have a module called Winser that does uses nssm and install as shwon here:


What i do is to run npm on the folder of the project and the project could be anywhere. I guess you might be missing some double-quotes "" for the path.





AJ ONeal

unread,
Apr 24, 2013, 2:24:23 PM4/24/13
to node.js mailing list
Behold Les Doubles-Quotes


Filename: "{app}\{#NSSM}"; Parameters: "install {#MyAppShortName} ""{pf64}\nodejs\node.exe"" ""{app}\bin\server.js"" ""5566"""; Flags: runhidden;
Filename: "{sys}\net.exe"; Parameters: "start {#MyAppShortName}"; Flags: runhidden;

Maybe when I'm rebuilding for my actual app I'll play with it a bit more.
Right now just thinking about Windows gives me an ulcer.

AJ ONeal

vortex

unread,
Apr 24, 2013, 4:43:35 PM4/24/13
to nod...@googlegroups.com
I would normally jump at the chance, but I am quite overwhelmed with work at the moment.


--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
 
---
You received this message because you are subscribed to a topic in the Google Groups "nodejs" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nodejs/vJugU0F7ezU/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to nodejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages