Open Rcjuk opened 10 years ago
I look at the source code of winser in node_modules.bin\winser and it seems that should be passed like this:
winser --env NODE_ENV=production --env DUMMY=1
but this fails with the error:
memo.push(val); ^ TypeError: Cannot call method 'push' of undefined at collect (C:\xampp\htdocs\windows-service-test\node_modules\winser\bin\winser:20:8)
rigth now i'm doing this:
node_modules\\winser\\bin\\nssm set [nombre-de-app] AppEnvironmentExtra NODE_ENV=production
it works but it is a little ugly :(
I can't get the winser --set option to understand anything I pass to it either, similar to your --env problem described here. The 'arg' the error message spits out is always a single seemingly random character despite calling it as such:
winser -i -s --set "servicename Application C:\\apth\\of\\some\\kind.exe"
or
winser -i -s --set "Application C:\\apth\\of\\some\\kind.exe"
or
winser -i -s --set "Application=C:\\apth\\of\\some\\kind.exe"
or
winser -i -s --set Application=C:\apth\of\some\kind.exe
How can you set these? I can see the --env option but am struggling to get this to work.
Thanks