Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enviromental Variables #34

Open
Rcjuk opened this issue Sep 12, 2014 · 3 comments
Open

Enviromental Variables #34

Rcjuk opened this issue Sep 12, 2014 · 3 comments

Comments

@Rcjuk
Copy link

Rcjuk commented Sep 12, 2014

How can you set these? I can see the --env option but am struggling to get this to work.

Thanks

@bjrmatos
Copy link

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)

@bjrmatos
Copy link

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 :(

@davehibshman
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants