motioneye-project / motioneye

A web frontend for the motion daemon.
GNU General Public License v3.0
3.99k stars 654 forks source link

Development environment / live reload #2901

Open sevimuelli opened 10 months ago

sevimuelli commented 10 months ago

Hi There is not much documentation concerning development of motionEye. What is the best way to run motionEye for development? Some way to have the project open in VS Code and continuously update the changes. Ideally, I could run it inside a container. I saw that inside server.py, when starting the Tornado webserver, there is an argument "debug", which is kinda doing this. But there is no way to set this under normal operation. What is the normal approach the developer here use? Any help is appreciated.

MichaIng commented 10 months ago

Python does not seem to have a native autoreload feature, which would be required here.

I tend to just restart motionEye when testing changes:

systemctl restart motioneye
zagrim commented 9 months ago

I tend to use the following manual "reload" cycle (simplified version here, as if not using Python venv): Rebuild: rm -r build/ motioneye.egg-info/; python3 -m pip install . Start: ~/.local/bin/meyectl startserver -c path/to/my/development/config Terminate server and repeat after changes to code.

Omumarvaishya commented 1 month ago

i have facing the same issue could you please mention some steps to establish dev environment?