Comments (7)
execArgv
is used to pass arguments to node. i.e. --debug
.
Use env
to pass options to your app.
This will put the options on process.env
, which wile not ideal is usable in development.
from gulp-develop-server.
without arguments in cli this module useless for any console-like tools. in many scenarios cli args more preferable than process.env
from gulp-develop-server.
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.
from gulp-develop-server.
not everytime. for example my SERVER has some commands:
Usage: app [options] [command]
Commands:
listen inititalize app and listen port
install install app in new environment
module [options] <name> create new module with given name by template
bump [options] <module> create new controller for given module by template
migration <name> create new migration template for module with given name
* help
Options:
-h, --help output usage information
-V, --version output the version number
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.
from gulp-develop-server.
Hello.
Thank you for reports.
I now understand the cause of this problem. (sorry...)
So we added options.args
for the client argument.
server.listen({
path: './stub/server.js',
args: ['--cliant-args'],
execArgv : ['--harmony']
});
will parse
node --harmony ./stub/server.js --cliant-args
If there is no problem I will merge this fix in the next version.
from gulp-develop-server.
yeah, its just what i need, thank you!
from gulp-develop-server.
If there is a problem, please reopen the issue.
Thanks.
from gulp-develop-server.
Related Issues (13)
- Livereload issues HOT 6
- Incorrect interpretation of server error on --debug HOT 2
- Cannot read property 'pid' of null HOT 5
- server.restart should restart server even when it's down HOT 3
- Run coffee HOT 1
- Colors in console HOT 3
- Expose a method or parameter that tells you if the server is currently running HOT 2
- server restarts on change in logs/
- Change current working directory HOT 1
- Server stops immediately HOT 2
- Include current environment variables for child processess HOT 3
- Pipe output to bunyan cli HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-develop-server.