GithubHelp home page GithubHelp logo

Comments (2)

rmg avatar rmg commented on May 28, 2024

@zpnk I can't think of a way to pick one that won't be wrong as often as it is right. Which process does stdin get sent to with foreman?

from node-foreman.

zpnk avatar zpnk commented on May 28, 2024

@rmg Thanks for the reply. I can't speak to the workings of foreman, but in theory (and this may be a terrible idea) all child processes could receive stdin and then could operate on it as needed.

My quick hack to get this working was to add the stdio option to the child process spawn here:

var child = prog.spawn(file, args, {
  env: proc.env,
  stdio: ['inherit', 'pipe', 'pipe'] // stdin=inherit, stdout & stderr=pipe (default, so events work)
});

This allowed nodemon to pick up 'rs' and restart. However, I realized that restarting nodemon kicks off a new node process which is then not killed when nf is exited. I'm not sure how that kind of issue could be solved.

If there was a good way of going about that, perhaps something like --inherit-stdin could be useful?

The use-case of running nodemon+watch is pretty dev-specific though, so it's probably a better fit for grunt/gulp.

I'll close, I don't want to litter your issues. :)

from node-foreman.

Related Issues (20)

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.