coreybutler / node-windows

Windows support for Node.JS scripts (daemons, eventlog, UAC, etc).
Other
2.8k stars 356 forks source link

Is it possible to pass parameters to the script ? #182

Closed paulpeeters closed 6 years ago

paulpeeters commented 7 years ago

How can I pass parameters to the script to be run as a Windows service ?

var svc = new Service({ name:'Hello World', description: 'The nodejs.org example web server.', script: 'C:\path\to\helloworld.js', params: '--port 8010 --log "C:\path\to\helloworld.log" ' });

coreybutler commented 6 years ago

Command line arguments aren't directly supported, since a wrapper is required.

I'd suggest using environment variables instead.

mojoaxel commented 4 years ago

A scriptOptions was added with #190