-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Description
What is the problem this feature will solve?
This is the default behavior in nodemon and would allow to automatically restart a script (in my case a web server) when an error forces the script to exit.
Example:
When running the sample file fail.js using node --watch=fail.ts fail.js, the following output is generated
Exit with code 1
Failed running 'fail.js'but the script is actually not restarted as I would have expected from the default behavior in nodemon that I'm trying to replace.
const exitCode = 1;
console.log(`Exit with code ${exitCode}`);
process.exit(exitCode);What is the feature you are proposing to solve the problem?
Either automatically restart the script when it exists with an error code when --watch is used automatically or add a specific cli option (--watch-restart-on-error) that enables this.
What alternatives have you considered?
Sticking with nodemon
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Type
Projects
Status
Awaiting Triage