seregazhuk / php-watcher

Monitor for any changes in your php application and automatically restart it (suitable for async apps).
https://sergeyzhuk.me/2019/10/18/php-watcher/
388 stars 30 forks source link

[Feature] Watching whether the script is alive #46

Closed seregazhuk closed 4 years ago

seregazhuk commented 4 years ago

Add the ability to watch whether the underlying script is running or dead. If the watcher detects a dead script is should try to restart it.

seregazhuk commented 4 years ago

Like nodemon does it:

[nodemon] clean exit - waiting for changes before restart
[nodemon] restarting due to changes...
[nodemon] starting `php server.php`
Listening on http://127.0.0.1:8000
[nodemon] app crashed - waiting for file changes before starting...

There is no need to restart the app, we can just notify about the dead script in the console.