> Try moving the following line:
>
> var express = require('express');
>
This works for me!
I suggest to add a note in the example on your web page.
It's now:
var logStream = fs.createWriteStream (process.argv[1] + ".log");
service.run (logStream, function () {
service.stop (0);
});
// Run service program code...
but should be:
var logStream = fs.createWriteStream (process.argv[1] + ".log");
service.run (logStream, function () {
service.stop (0);
});
// Run service program Code INCLUDING ALL NEEDED "REQUIRE" CALLS ...
Note, that it is also not allowed to call "consolo.log(...)" before
"service.run()".
This example code can not be started from Windows Service Manager because
"console.log()" is called before "service.run()":
case ("--run"):
var logStream = fs.createWriteStream (serviceName + ".log");
console.log("stream created, going to start the service");
service.run (logStream, function ()
{
service.stop (0);
});
Lets say, its a little bit tricky, but it works. Nice lib by the way!
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/f2fdb674-f5a1-4fec-81c9-82862bcabce4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.