Giter Site home page Giter Site logo

Comments (7)

pskaarup avatar pskaarup commented on June 22, 2024

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.

PinkaminaDianePie avatar PinkaminaDianePie commented on June 22, 2024

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.

pskaarup avatar pskaarup commented on June 22, 2024

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.

PinkaminaDianePie avatar PinkaminaDianePie commented on June 22, 2024

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.

narirou avatar narirou commented on June 22, 2024

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.

PinkaminaDianePie avatar PinkaminaDianePie commented on June 22, 2024

yeah, its just what i need, thank you!

from gulp-develop-server.

narirou avatar narirou commented on June 22, 2024

If there is a problem, please reopen the issue.
Thanks.

from gulp-develop-server.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.