Closed mnavarrocarter closed 5 years ago
You can surely write module like that, or use existing solutions like i found here: https://github.com/fesor/life-without-orm/blob/master/etc/scripts/checkDeps.sh https://github.com/fesor/life-without-orm/blob/master/etc/scripts/devServer.sh
Beta version - https://github.com/UPDG/roadrunner-hotreload My version is not so optimized, but works good on any platforms.
When developing, you can use the PhpStorm IDE built-in File Watchers
feature to run RR with http:reset key. It is very useful when working on Symfony app or similar, as RR should be restarted not only on .php files modification, but also yml and twig.
I don't think that rr needs native file watcher. It should be kept simple. And http:reset is enough. There a lot of simple file watcher in wild already.
EDIT: I thought a little over the weekend about this, and I think that it would be beneficial for RR getting popular. And that means overall better open source project.
Totally agreed.
It would be pretty cool to include something that works like Nodemon in this library: a process that scans for
*.php
file changes in the root folder of the project and then restarts the workers if any change in code is encountered.It could be optional and configurable in the
yaml
file. Suggestion:I know a little bit of Go, so I could give it a try. I imagine the way to implement this is a goroutine that is dispatched every x seconds, checks for changes, and restarts the worker if any change is made.