jfromaniello / winser

Run a node.js application as a window service using nssm.
270 stars 47 forks source link

Fix: set AppEnvironmentExtra args #39

Closed fossamagna closed 8 years ago

fossamagna commented 8 years ago

I have corrected the following problems.

When I set only one option --env following for.

winser -i --env NODE_ENV=production

I had error like following for.

C:\Users\username\app\node_modules\winser\bin\winser:296
            nssmExec('set', 'AppEnvironmentExtra "' + options.env.join(' ') + '"
',
                                                                  ^

TypeError: options.env.join is not a function

Also when I set --env option than once, like following for, Install of service is successful. But, Windows failed to start service.

winser -i --env NODE_ENV=production --env FOO=foo

Because winser execute command following for.

nssm set app AppEnvironmentExtra "NODE_ENV=production FOO=foo"

This is caused by enclosing with doble quote.

jfromaniello commented 8 years ago

Thanks! Published as v1.0.2

fossamagna commented 8 years ago

@jfromaniello Thank you to merge the PR. I would like to use winer@1.0.2 throgh official public npm registory. Would you publish winser@1.0.2 ?

jfromaniello commented 8 years ago

Yes I already did

fossamagna commented 8 years ago

@jfromaniello Right now, I was able to download it! Thank you.