mliezun / caddy-snake

Caddy plugin to serve Python apps
MIT License
66 stars 2 forks source link

Code reloading #13

Open alanpoulain opened 2 months ago

alanpoulain commented 2 months ago

Thank you for this project, it works great! I'm having a little issue though, the Python code seems to be not reloaded by the plugin, is it normal? For information, I'm using module_asgi with a FastAPI application (that's probably why).

mliezun commented 2 months ago

Hi @alanpoulain, sorry for the delay and thanks for using the plugin and filing an issue!

Code reloading is not built into the plugin yet. I can work on it and support it on a future release.

In the meantime, as a quick and dirty solution, you can use watchmedo to restart the caddy process each time you change a file.

alanpoulain commented 2 months ago

Thank you for your answer! No pressure, I can work on my project without relying on it, I just need to not forget to reload caddy 😅 I will try to use watchmedo if it's too cumbersome, thanks. Maybe you could add a line in the README to explain the issue?

mliezun commented 2 months ago

Good idea!

Done here https://github.com/mliezun/caddy-snake/commit/8725bc72230990c450244f00136e579d26ec2e09