-
Notifications
You must be signed in to change notification settings - Fork 11
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
Arguments to the script #7
Comments
Use |
without arguments in cli this module useless for any console-like tools. in many scenarios cli args more preferable than process.env |
You are right but, I think this tool was created to launch node web-servers like express. It seems people like to use NODE_ENV to set env flags. |
not everytime. for example my SERVER has some commands: Usage: app [options] [command] Commands:
Options:
So, i dont have separate tools for app, if i need to start server i write "node app.js listen". If i need to create migration or new module template i use server as a command line tool. it works fine with process managers like PM2, but i can't start server from this gulp module. |
Hello. server.listen({
path: './stub/server.js',
args: ['--cliant-args'],
execArgv : ['--harmony']
}); will parse
If there is no problem I will merge this fix in the next version. |
yeah, its just what i need, thank you! |
If there is a problem, please reopen the issue. |
There is no way to pass arguments to the script. Instead, arguments can be passed only to the node.js executable using option execArgv.
Expected behaviour:
Actual behaviour:
The text was updated successfully, but these errors were encountered: