Apache's prunsrv is also good to run nodejs as service, it has 64 bit
version.

http://commons.apache.org/daemon/procrun.html

Example .bat file - https://gist.github.com/1841079


On Feb 15, 12:21 am, Eric Jacobs <[email protected]> wrote:
> Hello there,
>
> I've been playing with getting a node based Windows service up and running
> for the last few weeks. I wrote a blog post about it 
> here:http://www.techosaur.us/2012/setting-up-a-quick-and-easy-file-server-...
>
> Now I'm trying to follow my own steps, but I'm running into problems
> getting the server to run as a service. I can run it manually without a
> problem like so:
>     PS C:\users\eric\Downloads> node 'C:\Program Files
> (x86)\static_server\static.js' 80
>     Now serving on port 80.
>
> But when I try to run it as a service, it never comes up. From the event
> log, it appears to crash over and over again. The service appears to be in
> a state of 'paused' when i check it in services.msc. I'm thinking the issue
> may be with the environment. To test this, I threw these lines into the top
> of static.js, and tried running it as a service:
>
>     var fs = require('fs')
>       ;
>
>     fs.writeFileSync(__dirname + '/sombrero', new
> Buffer('abcdefghijklmnopqrstuvwxyz'));
>
>     PS C:\users\eric\Downloads> .\nssm.exe install bus "C:\Program Files
> (x86)\nodejs\node.exe" "C:\Program Files (x86)\static_server\static.js"
> "80" "C:\Program Files (x86)\spotterrf_node"
>     Service "bus" installed successfully!
>     PS C:\users\eric\Downloads> net start bus
>     The bus service is starting.
>     The bus service was started successfully.
>
> But that file never gets created, and the server never actually runs.
> (note, i use 'bus' as a service name when testing).
>
> Any ideas?
>
> --
> Eric Jacobs

-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to