4 ms·
When a framework "supports auto-restart", that usually means it has its own webserver for development and the auto-restart is supported when you use that. I do
by JonathanBeuys 3y ago
When a framework "supports auto-restart", that usually means it has its own webserver for development and the auto-restart is supported when you use that.
I don't like having a different webserver in development and production.
- loloquwowndueo 3y agoFor Python, gunicorn is suitable for production and development use and has a --reload option to reload on changed files. This functionality is framework-independent.
- JonathanBeuys 3y agoThe way I understand the gunicord documentation, this has the same effect as if you set up a script which listens for file changes and restarts the server (or workers) every time a file changes. That's way less efficient compare to how PHP handles it. I don't want processes to be killed and new ones to be started every time I change a file. PHP does it the right way: Only when a request that touches outdated code hits the server is that outdated code reparsed. As long as you just edit files, it uses up no resources at all.
- loloquwowndueo 3y agoI’ve never switched to the browser and reloaded the page fast enough to “beat” a gunicorn reload after editing a file. So I get not “wanting” a process restart but I don’t get why it’s such a big deal in a practical sense. But hey if using what you use does what you want, then you do you.