Comments (8)
Hmm, if I understand correctly it's a question of setting the arguments against coffee
or node
, as opposed to setting them against your own application: node --node-opt app.js
vs node app.js --my-opt
. I think we should support both, ideally at the same time (a flaw with the --options-first
style.
Right now, it's possible to do this like so:
supervisor -x 'coffee' -- --nodejs --debug app.coffee
Or, it would be possible except for a bug that's inserting a comma for some reason.
I realize this is somewhat awkward syntax. I'm open to suggestions for better ways to do it.
from node-supervisor.
Thanks for the tip! Despite printing out
Starting child process with 'coffee --debug,app.coffee --nodejs'
it somehow works :) However, I'm using foreman to run the app and it doesn't like this syntax, because it fails with:
web.1 | DEBUG: Starting child process with ''coffee' --debug,app.coffee --nodejs'
web.1 | DEBUG: execvp(): No such file or directory
Anyway, I think you're right about node options vs application options.
I'm not sure about the comma bug you mentioned, but I guess that it's just displayed incorrectly - in supervisor.js#152 there's the following line:
util.debug("Starting child process with '" + exec + " " + prog + " " + args + "'");
that converts args
array to a string using join(",")
by default. It could be easily fixed by joining them manually:
util.debug("Starting child process with '" + exec + " " + prog + " " + args.join(" ") + "'");
from node-supervisor.
Ah, cool. So I'll consider this an issue that has a workaround, but could definitely benefit from a friendlier solution.
That's weird that foreman is choking on it. You're running from a Procfile, I assume? You could ask them if that's intended behavior.
from node-supervisor.
Hi, thank for the tip. I works well excepted that launching
supervisor -e "coffee|node|js" -x coffee -- --nodejs --debug app.coffee
hangs when I modify one of the application files. I got the message DEBUG: crashing child
, then nothing happens. Would it be related ?
from node-supervisor.
Hmm, interesting. It looks like somehow coffeescript or the --nodejs
option is causing a bug. I opened #51 to deal with that.
from node-supervisor.
I had another think about this. Here's my new idea, lemme know how this feels: we could offer a wildcard flag, --x-foo
, where anything after the --x-
gets passed in as a --
argument to the child.
supervisor --x-debug-brk server.js #=> node --debug-brk server.js
supervisor --x-node-debug-brk server.coffee #=> coffee --node-debug-brk server.coffee
I'm thinking it would either be --x-foo
(to match the -x
option), or --child-foo
(for obvious reasons).
from node-supervisor.
not sure if this is still an issue but i was able to get going on windows without modifying supervisor code via the cli-wrapper.js
start cmd.exe /k "node-inspector"
start cmd.exe /k "node node_modules\supervisor\lib\cli-wrapper.js -w .,node_modules,node_modules/custom_modules -- ""--debug-brk ./././index.js"""
the first line is just to start the node-inspector
basically escaped the program param with double quotes: -- ""--debug-brk ./././index.js"""
make sure that the program parameter is passed in with double dash and space in front
from node-supervisor.
Will track future progress on options in #123.
from node-supervisor.
Related Issues (20)
- node native Inspector not work with custom port using supervisor HOT 5
- not possible to have colored output (using the unbuffer trick, doesnt work)
- Does not work with node 7 HOT 3
- package.json license is "MIT", but the actual LICENSE file is BSD-2.
- How to add node --max-old-space-size flag? HOT 3
- Conflict with phantomjs while converting to pdf HOT 1
- Prevent developers from unintentionally killing daemon / worker processes on local machine
- why my node-supervisor doesn't work
- 100% CPU load when I use 'supervisor app.js' but when I use' node app.js ' just only 5% CPU load HOT 4
- Supervisor stop accepting "rs" to restart
- bash: supervisor: command not found HOT 2
- problem with --experimental-modules HOT 1
- How do I listen for all types of files?
- Recurse over directories
- Is there a way to use the preload args of node? HOT 3
- is there a way to exit on error instead of hanging?
- can this run Python as well?
- Infinite restarts of "Starting child process" HOT 2
- Arguments Incorrectly Parsed HOT 3
- Can this be run in background?
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 node-supervisor.